0

I am running a mail server with Postfix and Mailman and there's a problem: all users of a certain non-public mailing list are students of John Doe University and use

firstname.lastname@john-doe-university.example

as their mail address. However, the university has a second domain jdu.example and depending on the configuration of the students' mail client, the sender field in outgoing e-mails might also contain

firstname.lastname@jdu.example.

For those people this means that Mailman won't accept their postings because they're subscribed using the long version of their mail address but trying to post using the short version.

Obviously, adding duplicates to the subscriber list would not be an option since everyone would get the postings twice then. How can I configure either Mailman or Postfix to avoid this problem?

Sora.
  • 1,395
  • 1
  • 11
  • 14
  • 1
    This isn't really on topic for stackoverflow (it's not related to software development). However, I think you would solve this in Postfix via [canonical address remapping](http://www.postfix.org/ADDRESS_REWRITING_README.html#canonical). – larsks Dec 22 '17 at 17:25
  • @larsks Ouch, I accidentally posted this to Stack Overflow, I wanted to post it to Server Fault. Can anyone please move this or do I have to open a new post over there? But thanks, I'll have a look at your link. – Sora. Dec 22 '17 at 17:27

1 Answers1

0

Thanks to larsks's comment, the problem is now resolved - the key was reconfiguring Postfix, not Mailman. Adding

canonical_maps = regexp:/etc/postfix/canonical
local_header_rewrite_clients = static:all

to main.cf and creating /etc/postfix/canonical with

/(.*)@jdu.example/ ${1}@john-doe-university.example

did the trick.


I know I posted to the wrong site, I meant to post this to Server Fault but didn't notice I was in the wrong tab, but I'm going to leave this here in case someone googles the same question and finds it useful.

Sora.
  • 1,395
  • 1
  • 11
  • 14