On Fri, Sep 19, 2008 at 12:41:13PM +0200, Mauro Sanna wrote: > Il giorno gio, 18/09/2008 alle 14.11 +0200, mouss ha scritto: > > Mauro Sanna wrote: > > > Hello, sorry for my bad english. > > > I have to send messages to more than one person using a single mail > > > address. > > > So I've created a virtual-alias: [EMAIL PROTECTED] myaccount and a > > > text file, myaccount.txt, with all the addresses that I want to send > > > mail. > > > Then I put in /etc/aliases: > > > myaccount: :include:/etc/postfix/myaccount.txt. > > > Now I send my mail to [EMAIL PROTECTED] and it is received by all > > > the accounts that are in the file myaccount.txt and it's all ok. > > > The problem is that the server name is mail.example.com and if I send a > > > mail to [EMAIL PROTECTED] it is delivered in the same way as > > > [EMAIL PROTECTED] > > > I don't want that [EMAIL PROTECTED] is delivered. > > > I want that only adresses with @example.com are delivered. > > > How can I solve it? > > > > remove $myhostname from mydestination. > > > > In mydestination I have only mail.example.com, localhost.example.com, , > localhost. > example.com is managed as a virtual domain. > Can I leave mydestination empty?
Almost. You should probably still have at least one domain listed, that is used for the right-hand-side of aliases where the target should be a local delivery. One approach is to use: main.cf: mydestination = local.invalid smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/reject_invalid check_recipient_access regexp:/etc/postfix/reject_invalid reject_invalid: /[EMAIL PROTECTED]/ REJECT invalid sender or recipient domain with this "local.invalid" is delivered locally after aliasing, but never accepted via SMTP. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:[EMAIL PROTECTED]> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.