[pfx] Re: forwarding questions
> I have a local real mailbox: u...@foo.com > When I setup this alias map in virtual_alias_maps file: > > u...@foo.com u...@gmail.com > > (then postmap this file). > The message sent to u...@foo.com won't reach into mailbox, but just forwarded > to gmail. > > How can I setup it to both reach local mailbox and forwarding? u...@foo.com u...@foo.com,u...@gmail.com Gmail is now enforcing spf, that means you need to - add a dns/txt/spf record for your server/domain - rewrite sender for forwarded mails (e.g. postsrsd) - stop forwarding spam As others have said this is a bad idea. There is a much better way: deliver mails to your local u...@foo.com mailbox and tell Gmail to fetch it from there via pop3: https://support.google.com/mail/answer/21289?hl=en Best regards, Gerald ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: forwarding questions
map in virtual_alias_maps file: u...@foo.com u...@gmail.com (then postmap this file). The message sent to u...@foo.com won't reach into mailbox, but just forwarded to gmail. How can I setup it to both reach local mailbox and forwarding? This is a bad idea. Don't do this. Forwarding spam to gmail, or mail from external senders with SPF policies, ... will fail to be delivered, and will tarnish your server's "reputation". It can of course be made to "work" (in the sense of queueing the mail for delivery), but really, don't. Thanks Victor. I know this is not good idea to forward messages to external systems. But for tech way, what's the right setup to both keep messages in local mailbox and forward them to another address? From http://www.postfix.org/virtual.5.html, note "Virtual aliasing is recursive; to terminate recursion for a specific address, alias that address to itself." Not 100% sure but try this: map in virtual_alias_maps file: u...@foo.com u...@foo.com u...@gmail.com u...@gmail.com u...@gmail.com The second line is probably not strictly necessary but may terminate the recursive evaluation of aliases. You will also need to set up Sender Rewriting Scheme (SRS) or similar, or forwards from SPF domains will be blocked at the other end anyway. -- This email has been checked for viruses by AVG antivirus software. www.avg.com ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: forwarding questions
On 2023-04-28 10:21, Viktor Dukhovni via Postfix-users wrote: On Fri, Apr 28, 2023 at 08:32:29AM +0800, Tom Reed via Postfix-users wrote: I have a local real mailbox: u...@foo.com. When I setup this alias map in virtual_alias_maps file: u...@foo.com u...@gmail.com (then postmap this file). The message sent to u...@foo.com won't reach into mailbox, but just forwarded to gmail. How can I setup it to both reach local mailbox and forwarding? This is a bad idea. Don't do this. Forwarding spam to gmail, or mail from external senders with SPF policies, ... will fail to be delivered, and will tarnish your server's "reputation". It can of course be made to "work" (in the sense of queueing the mail for delivery), but really, don't. Thanks Victor. I know this is not good idea to forward messages to external systems. But for tech way, what's the right setup to both keep messages in local mailbox and forward them to another address? regards Tom ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: forwarding questions
Tom Reed via Postfix-users writes: > (...) > How can I setup it to both reach local mailbox and forwarding? > You first have to read 3 times very carefully: https://support.google.com/mail/answer/175365?sjid=13805511033984428370-AP I read all emails at Gmail. Yes i'm forwarding user like you. Sincerely, -- ^고맙습니다 _布德天下_ 감사합니다_^))// ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org
[pfx] Re: forwarding questions
On Fri, Apr 28, 2023 at 08:32:29AM +0800, Tom Reed via Postfix-users wrote: > I have a local real mailbox: u...@foo.com. When I setup this alias > map in virtual_alias_maps file: > > u...@foo.com u...@gmail.com > > (then postmap this file). The message sent to u...@foo.com won't > reach into mailbox, but just forwarded to gmail. > > How can I setup it to both reach local mailbox and forwarding? This is a bad idea. Don't do this. Forwarding spam to gmail, or mail from external senders with SPF policies, ... will fail to be delivered, and will tarnish your server's "reputation". It can of course be made to "work" (in the sense of queueing the mail for delivery), but really, don't. -- Viktor. ___ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org