Hi Noel, Thanks for the corrections... anyway this solution doen't solve the problem that I have. Infact I fetch the email for all my accounts (included gmail and hotmail accounts) with some Perl POP3 scripts.
I want to use Postfix just to send email(relay it) from a hold queue. Let me explain better the configuration: this mailserver is back on a dial-up connection. On this mailserver I've a @domain.com and some emails from @gmail, @hotmail, etc... All the emails are not directly send to destination, but all are relayed to smtp servers. So @domain.com are gonna be relayed to smtp.domain.com. However here is where it gets tricky, not all addresses for @domain.com are used on this server. Some of them are hosted on smtp.domain.com. So [email protected] might be valid on our server, but our smtp.domain.com server also has [email protected] which our server is not aware off. So I basically want to relay all emails to @domain.com which are NOT valid user mailboxes on our server via our second server (smtp.domain.com). I would also like to relay privat emails that needs to be sent from @gmail.com,@hotmail.com etc to the relative smtp server. However I do not which to map these to the local domain.com domain. They should have seperate maildirs from the work related accounts. If for example I'll cancel 'gmail.com' from mail_domain, I'm able to relay without problem emails to smtp.gmail.com. The smtp server is decided in the file bysenderrelay, so that for every sender I've the correct smtp server. Is it more clear? Here is a example list of some users we have, Local server [email protected] [email protected] Internet server (smtp.domain.com) [email protected] [email protected] [email protected] [email protected] So to summerize, I want emails to [email protected] to be relayed to smtp.domain.com and I want emails to [email protected] to be delivered locally. My main.cf is very messy at the moment as I have tried loads of different configurations. Could you point me in the right direction to set this up as my above example? Thanks a lot for your help > To receive mail locally for [email protected], add an entry to > virtual_alias_maps (NOT! virtual_alias_domains) like > [email protected] ...@localhost
