I want to install an imap-mailserver for a small internal net (up to 25 users) on an debian etch system and want to use it also to receice mails from various external e-mailaddresses.
I found this
http://workaround.org/articles/ispmail-etch/index.html.de instruction which sounds realy good.
I also understand that i can use fetchmail to get mails from various external accounts on my mailserver by telling fetchmail that
Code:
user someuser@externaldomain there with password extpassword ist user someuser@mydomain.intern
and that i can use a smarthost by using
/etc/postfix/sasl_password and writing something like
mail.externaldomain.net
usernam@externaldomain.netassword
into this file. But as far as I understand this means, that all mail to external recipients is sent with the account
usernam@externaldomain.net in the "From:" field.
What i want to know is. Is there a way to use postfix like a "reverse"fetchmail by telling it somehow, that it should use different smathosts with different accounts and different passwords for different localaccounts?
I mean is there a way to define something like:
Code:
...
user someuser@mydomain.intern is someotheruser@someexterndomain with passwordforexterndomain
user someotheruser@mydomain.intern is yetanotheruser@someotherexterndomain with anotherexternpassword
...
so that all mails to external recipients are stored in the sentdirectory of my intern mailserver and sent via different smarthosts with different "from:" fields to the external recipients and all answers where fetched with fetchmail from the different external email-accounts and stored in my intern mailserver and there available to the specified internal users and all my internal mails are only stored and distibuted internal?