postfix + mysql forwarding

Hi all, I have a postfix with mysql and courier that I set up a long time ago following https://library.linode.com/email/postfi … an-5-lenny">https://library.linode.com/email/postfix/courier-mysql-debian-5-lenny, which works fine. I've tried setting up forwarding as described here https://workaround.org/book/export/html/58 but it's not working, I suspect because I already have a 'real' inbox at the address I want to forward. It'll probably make more sense if I show you…

posftix config has:

virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-virtualforwardings.cf, mysql:/etc/postfix/mysql-virtualemail2email.cf

the forwardings table in mysql has:

abuse@mysite.com dave@mysite.com

(etc. - all these local forwards have always worked fine)

dave@mysite.com dave@gmail.com (which I added today)

the users table has:

dave@mysite.com (password)

(etc.)

postmap -q abuse@mysite.com mysql:/etc/postfix/mysql-virtual_forwardings.cf returns dave@mysite.com (as you'd expect)

postmap -q dave@mysite.com mysql:/etc/postfix/mysql-virtual_forwardings.cf returns dave@gmail.com

…But emails are not being forwarded to dave@gmail.com.

Ideally I'd like emails to continue to be available via courier on my server but also be forwarded to dave@gmail.com. If not possible, I need to be able to continue to run postfix/courier as is for other accounts, but need dave@mysite.com forwarded to dave@gmail.com without too much upheval to the other accounts/setup I have on the box.

Much thanks in advance for any pointers.

Dave

2 Replies

I'm still trying to get this working. It looks from various web pages like I should be able to add

senderbccmaps = hash:/etc/postfix/sender_bcc

recipientbccmaps = hash:/etc/postfix/recp_bcc

to main.cf, then in those files senderbcc and recpbcc have:

me@mylinode.com me@gmail.com

Then run postmap /etc/postfix/recpbcc; postmap /etc/postfix/senderbcc; service postfix restart

But no luck - no bccs to gmail, and not a sausage in mail.log or mail.info about it.

Any ideas please?

You might be able to generate extra logging using the debugpeerlist config option, or by starting the cleanup daemon with the -v option to make it more verbose. If Postfix is seeing the mail as being generated internally, it won't add automatic BCC recipients; that might be what's happening, or maybe something else.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct