On Tue, Oct 30, 2012 at 08:59:09AM +0200, Coert Waagmeester wrote:
> Managed to get my mail server running,
> 
> it serves 6 domains , mydomain.(.net, .com, and .co.za) and
> lists.mydomain.(.net, .com, and .co.za)
> 
> These are setup as relay domains, so for instance, anything sent
> to mydomain.net goes to another mail server via smtp, and anything 
> sent to lists.mydomain.net goes to postfix-to-mailman.py

FWIW, it is much easier to run Mailman as a local domain, in 
mydestination. Simply add the Mailman aliases file to alias_database 
and alias_maps, and you are done. Mailman then handles its own list 
aliases through the web or command line interfaces.

> The problem I have now is, for any undeliverable message, postfix
> sends a mail to mailer-dae...@lists.mydomain.net instead of
> mailer-dae...@mydomain.net.. so all undeliverable warning messages
> end up as new posts to my mailing list!
> 
> How can I change this?

What? You made a list called "mailer-daemon"? Mailer-daemon is a 
reserved system alias.

If you want help with your specific problem, you must post evidence 
thereof. Stan suggested the list welcome message for posting 
guidelines; see here if you don't have that message:

http://www.postfix.org/DEBUG_README.html#mail

Include complete, non-verbose logging of a single message which 
indicates the problem. You might also have to include the relevant 
excerpt of the Mailman aliases file.

My WAG here is that you did not set relay_recipient_maps.

> I want it to send to mydomain.net, not lists.mydomain.net
> 
> Can I have any mailer-daemon type error sent to a custom address?

Email 101: Bounces are sent to the envelope sender address. No.

> here is excerpt of my current conf:

Excerpt? What relevant parts are omitted?

> main.cf--------------------------
> myorigin = mydomain.net
> mydestination =
> 
> relay_domains = mydomain.net, mydomain.com, mydomain.co.za,
> lists.mydomain.net, lists.mydomain.com, lists.mydomain.co.za

When munging domains, do not steal real domain names that you do not 
control. Example.TLD has been reserved in most gTLDs and many other 
TLDs as well.

Per my suggestion above, this would be:

mydestination = lists.example.net, lists.example.com,
    lists.example.za
relay_domains = example.net, .example.com, example.za
relay_recipient_maps = hash:/etc/postfix/relay_rcpt

You DO need relay_recipient_maps for relay_domains, else you could 
(or WILL) become a backscatter source. See:

http://www.postfix.org/ADDRESS_CLASS_README.html#relay_domain_class

> transport_maps = hash:/etc/postfix/transport
> mailman_destination_recipient_limit = 1
> ---------------------------------
> 
> transport------------------------
> mydomain.net             smtp:mail.myotherdomain.net
> mydomain.com             smtp:mail.myotherdomain.net
> mydomain.co.za           smtp:mail.myotherdomain.net
> lists.mydomain.net       mailman:
> lists.mydomain.com       mailman:
> lists.mydomain.co.za     mailman:

Per my suggestion above, the lists domains would be omitted here, 
simply using the default local_transport. And the following pipe 
transport would not be needed.

> master.cf------------------------
> mailman   unix  -       n       n       -       -       pipe
>   flags=FR user=mailman:mailman
>   argv=/usr/lib/mailman/postfix-to-mailman.py ${nexthop} ${user}
> ---------------------------------
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

Reply via email to