|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: mouss (mlist.only
free.fr)
Date: Wed Aug 22 2007 - 05:03:51 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neil Wilson wrote:
> Hi guys,
>
> Is it possible to use the /etc/aliases table while also forwarding email
> for the same domain to another server using a transport?
>
> It only needs to be for a few addresses not all of them.
>
> My reason for this is, mailman relies on these aliases to send out mail,
> but I need to have all email
>
> /etc/aliases
> ## mailman mailing list
> mailman: "|/usr/local/mailman/mail/mailman post mailman"
> mailman-admin: "|/usr/local/mailman/mail/mailman admin mailman"
> mailman-bounces: "|/usr/local/mailman/mail/mailman bounces mailman"
> mailman-confirm: "|/usr/local/mailman/mail/mailman confirm mailman"
>
>
> /etc/postfix/main.cf
> mydomain = lists.blabla.co.za
> myorigin = $mydomain
> mydestination = $myhostname, localhost.$mydomain, $mydomain,
> unknown_local_recipient_reject_code = 550
> mynetworks = 127.0.0.0/8, 10.1.0.1/32, 10.1.0.3/32
> smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
> smtpd_sender_restrictions = reject_unknown_sender_domain,
> hash:/etc/postfix/access
> alias_maps = hash:/etc/aliases
> transport_maps = hash:/etc/postfix/transport
> relay_transport = smtp
> local_recipient_maps =
> local_transport = error:local mail delivery is disabled on this machine
>
>
> /etc/postfix/transport
> blabla.co.za smtp:[10.1.0.3]
>
> Below is the error from my logs...
>
> Aug 21 15:09:20 lists postfix/smtpd[22612]: NOQUEUE: reject: RCPT from
> unknown[10.1.0.5]: 550 <allstaff
lists.blabla.co.za>: Recipient address
> rejected: local mail delivery is disabled on this machine;
> from=<sward
blabla.co.za> to=<allstaff
lists.blabla.co.za> proto=ESMTP
> helo=<mail.blabla.co.za>
since you disabled local transport, /etc/aliases is not used at all.
enable local_transport and set
mydestination = localhost, localhost.$mydomain
local_recipient_maps = $_alias_maps
Then in virtual_alias_maps, put mappings like
allstaff
lists.blabla.co.za foo
example.com, allstaff
localhost
now mail to allstaff
lists.... will be sent to foo
example.com and to
allstaff
localhost. The latter is a local address (see mydestination) so
will trigger the /etc/aliases.
The setup above will make localhost and localhost.$mydomain local and
thus acceptable. you can add a check_recipient_access to reject mail to
these via smtp.
smtpd_sender_restrictions =
check_recipient_access hash:/etc/postfix/block_localhost
== block_localhost:
localhost REJECT unknown domain (localhost)
localhost.blabla.co.za REJECT unknown domain (localhost.blabla...)
PS. This assumes the default smtpd_delay_reject=yes. the reason why it
is under smtpd_sender_restrictions is that this will avoid opening a
(relay) hole should you put a OK in the map (accidentally or not).
>
> Any assistance will be greatly appreciated.
>
> Thanks in advance.
>
> Regards.
>
> Neil
>
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]