PDA

View Full Version : [ubuntu] postfix as mail forwarder



vralfy
April 25th, 2011, 12:15 PM
Hi,

i'm trying to configure postfix as virtual mailforwarder. I have a little server at home and i want my mailclients to send a mail (wich may contain a large attachment) to this little server an not to my provider. The server has to archive this mail and send it to the provider (as the mailclients should use to do [red lines]).

For example (blue lines)

I'm using thunderbird and I'm sending a mail as user@littleserver. The littleserver archives the mail an send it via googlemail as mailnewb@googlemail.com to mailpro@yahoo.com. I don't know how to realize it with postfix. Also it would be nice if i dont have to create a lot of linuxusers for each smtp-account.

http://www.foopara.de/example.png

SeijiSensei
April 25th, 2011, 02:06 PM
I'm using thunderbird and I'm sending a mail as user@littleserver. The littleserver archives the mail an send it via googlemail as mailnewb@googlemail.com to mailpro@yahoo.com. I don't know how to realize it with postfix. Also it would be nice if i dont have to create a lot of linuxusers for each smtp-account.

Most email servers don't allow ordinary users to rewrite the From addresses in the way you want for security reasons. Creating the archived version and forwarding it along is pretty easy to accomplish using the standard aliasing mechanisms (/etc/aliases or /etc/mail/aliases):



user \user,mailpro@yahoo.com


will keep a local copy ("\user") and send another to the mailpro account. Then run "sudo newaliases" to update the alias database.

However the From address will be user@localserver. I don't know how to rewrite that in Postfix. With sendmail, you can use a "genericstable (http://www.madboa.com/geek/sendmail-genericstable/)" map to accomplish this if the user appears in /etc/mail/trusted-users.

vralfy
April 25th, 2011, 02:20 PM
Is there an complete tutorial with sendmail which fits to my request?

Thanks anyway

moonport
April 25th, 2011, 03:32 PM
Is there an complete tutorial with sendmail which fits to my request?

Thanks anyway

Try this:
http://www.sendmail.com/sm/open_source/docs/