Dear all,
I have configured postfix mail server with dovecot and webmail ( sqirrelmail).
I have created aliase for perticular user so that I can get every mail send to user in aliase user mail box. It is running well.
I can send email to outside domain like

I want to set whatever outgoing mail from my mail server should sent one copy to that too without knowing that user.
Please help if you have any idea on this. Looking for earliest reply

Thanks
chunchuwar

Dani AI

Generated

Both and were heading toward the right idea: this is solved at the Postfix level, not in user aliases or webmail. The most practical, low-impact options are Postfixs native automatic-BCC features: use a per-sender map for selective copies, or a global copy for everything. These methods run inside Postfix and keep users unaware while avoiding client-side changes.

A concise workflow:

  • Add a map or a parameter in Postfix main.cf (example shows the form; adapt domain and addresses).
  • Populate the map with the sender-to-archive mappings (or set a single global target).
  • Run postmap on the map file and reload Postfix.
  • Verify delivery in the mail log and test with one account before wide deployment.

Quick examples (adjust paths and addresses as needed):

# in /etc/postfix/main.cf
sender_bcc_maps = hash:/etc/postfix/sender_bcc
# or for a blanket copy:
# always_bcc = archive@example.net
# /etc/postfix/sender_bcc
user@domain.tld    archive@example.net
@domain.tld        archive@example.net

Common pitfalls and cautions:

  • Run postmap /etc/postfix/sender_bcc and postfix reload; wrong map format or permissions prevent the mapping from being used.
  • Avoid routing the BCC target back through the same mapping (loops). If the archive address is local, use a dedicated transport or domain to prevent recursion.
  • Consider DKIM/SPF/DMARC and privacy/compliance rules before silently archiving user mail; legal constraints may apply.
  • Check logs (typically /var/log/mail.log or /var/log/maillog) for delivery errors after testing.

Postfix documentation for the relevant parameters is authoritative: see the sender_bcc_maps and always_bcc entries in the Postfix manual (postconf). Links: sender_bcc_maps always_bcc.

Recommended Answers

All 2 Replies

Considering the bad grammar I might be wrong, but you can have a look at the 'virtual' config file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.