Evaggelos Balaskas - System Engineer

The sky above the port was the color of television, tuned to a dead channel

Blog
Posts
Wiki
About
Contact
rss.png twitter linkedin github gitlab profile for ebal on Stack Exchange

ούτε μια ώρα στην ελλάδα! »
  -  
« You can use vim to crash a server
Dec
23
2010
postfix & recipient bcc aka Automatic BCC recipients
Posted by ebal at 17:28:05 in planet_ellak, planet_Sysadmin

I am supporting a greek company with two linux servers.
These two linux boxes have a lot of services,
including a mail server and they are set upped as active/passive.

In the past week they lost their internet adsl connection.
This is a true and horrible story, but for that i’ll write another post in near future.
So without an internet connection there werent a lot of things i’ve could do.

Thanks to Santa Claus i had predict this problem and i have installed a linux vps server outside of the company as a backup mx/mail server to queue all the undelivered mail.

From the company, i ‘ve been asked if i could keep all the mails in queue and also provide a copy to a gmail account. After google searching about postfix rewrite and re-queue i ‘ve came to automatic recipient bcc.

In my /etc/postfix/main.cf (or you can use postconf) i added this line:


recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc_maps

If you are a careful reader then you have noticed that i wrote regexp for my recipient map file.
And the reason is that i wanted to combine all the mails that came to the backup mx server.

This is my /etc/postfix/recipient_bcc_maps:


/@example.com/       example.com@gmail.com

Of course i had to reload postfix in the vps and send a test email to verify that the blind copy for all the domain is working.

If you want to re-queue all the mails then you have to do something like this:


postsuper -r ALL

PS: As the Journey have said: Don’t Stop Believing …. in Santa Claus
Have a nice holiday :)

  • 1 comment
ούτε μια ώρα στην ελλάδα! »
  -  
« You can use vim to crash a server

Search

Admin area

  • Login

Categories

  • blog
  • wiki
  • pirsynd
  • midori
  • books
  • archlinux
  • movies
  • xfce
  • code
  • beer
  • planet_ellak
  • planet_Sysadmin
  • microblogging
  • UH572
  • KoboGlo
  • planet_fsfe

Archives

  • 2022
    • November
    • October
    • August
    • February
  • 2021
    • November
    • July
    • June
    • May
    • April
    • March
    • February
  • 2020
    • December
    • November
    • September
    • August
    • June
    • May
    • April
    • March
    • January
  • 2019
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2018
    • December
    • November
    • October
    • September
    • August
    • June
    • May
    • April
    • March
    • February
    • January
  • 2017
    • December
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2016
    • December
    • November
    • October
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2015
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • January
  • 2014
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2013
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2012
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2011
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2010
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
  • 2009
    • December
    • November
    • October
    • September
    • August
    • July
    • June
    • May
    • April
    • March
    • February
    • January
Ευάγγελος.Μπαλάσκας.gr

License GNU FDL 1.3 - CC BY-SA 3.0