.forward email address not used by postfix

Ask questions about Arch Linux ARM. Please search before making a new topic.

.forward email address not used by postfix

Postby jeajea » Mon Jul 01, 2013 9:52 pm

I thought I had postfix setup correctly until an email was sent to root.
I created a user account “fw-mail” for mail forwarding. Using that account I created a .forward file with

$this->bbcode_second_pass_code('', 'mymail@gmail.com ')

in /home/fw-mail. In aliases I have
$this->bbcode_second_pass_code('', '
Root: fw-mail')

And I ran newaliases to update the database.
When mail is sent to root it goes to fw-mail and then is relayed to gmail.com using

$this->bbcode_second_pass_code('', 'to=<fw-mail@home.test> ')

instead of my email address. Gmail then sends me a delivery failure (as it shoud).

$this->bbcode_second_pass_code('', 'Jul 1 16:55:36 plug251 postfix/postfix-script[1277]: stopping the Postfix mail system
Jul 1 16:55:36 plug251 postfix/master[1199]: terminating on signal 15
Jul 1 16:55:39 plug251 postfix/postfix-script[1350]: starting the Postfix mail system
Jul 1 16:55:39 plug251 postfix/master[1352]: daemon started -- version 2.10.1, configuration /etc/postfix
Jul 1 16:55:54 plug251 postfix/pickup[1353]: 9ED9BC19A: uid=1001 from=<usg50>
Jul 1 16:55:54 plug251 postfix/cleanup[1360]: 9ED9BC19A: message-id=<20130701205554.9ED9BC19A@plug251.home.test>
Jul 1 16:55:54 plug251 postfix/qmgr[1354]: 9ED9BC19A: from=<usg50@home.test>, size=434, nrcpt=1 (queue active)
Jul 1 16:55:54 plug251 postfix/cleanup[1360]: C0758C199: message-id=<20130701205554.9ED9BC19A@plug251.home.test>
Jul 1 16:55:54 plug251 postfix/qmgr[1354]: C0758C199: from=<usg50@home.test>, size=568, nrcpt=1 (queue active)
Jul 1 16:55:54 plug251 postfix/local[1362]: 9ED9BC19A: to=<root@plug251.home.test>, relay=local, delay=0.26, delays=0.16/0.05/0/0.04, dsn=2.0.0, status=sent (forwarded as C0758C199)
Jul 1 16:55:54 plug251 postfix/qmgr[1354]: 9ED9BC19A: removed
Jul 1 16:55:57 plug251 postfix/smtp[1363]: C0758C199: to=<fw-mail@home.test>, orig_to=<root@plug251.home.test>, relay=smtp.gmail.com[173.194.75.108]:587, delay=2.5, delays=0.03/0.13/0.96/1.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1372712157 p5sm7101490vek.1 - gsmtp)
Jul 1 16:55:57 plug251 postfix/qmgr[1354]: C0758C199: removed
[root@plug251 postfix]#')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: .forward email address not used by postfix

Postby pepedog » Mon Jul 01, 2013 10:29 pm

What about putting this in /etc/postfix/aliases
root: whatever@gmail.com
Run newaliases after edit
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: .forward email address not used by postfix

Postby jeajea » Mon Jul 01, 2013 11:39 pm

Thank you very much.
It worked :) :) :)
I had tried this configuration before but must have had some other error.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: .forward email address not used by postfix

Postby pepedog » Tue Jul 02, 2013 12:21 am

Probably many ways of doing this, users wouldn't have access to this, just guessing but maybe ~/.mailrc too
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK


Return to User Questions

Who is online

Users browsing this forum: No registered users and 1 guest