Opened 3 months ago

Last modified 7 weeks ago

#14277 assigned Bug/Something is broken

Enable automatic clean up for ListServ

Reported by: Owned by:
Priority: Medium Component: Tech
Keywords: Cc:
Sensitive: no


(Moved from #14184) This task is to enable reverse (inbound) routing back to ListServ, and commensurate configuration there to enable automatic list cleanup for un-deliverable email addresses.

Prior to completing this task, we'd like to ensure that backups are happening for ListServ subscription lists on this machine. See #14276

Instructions direct from ListServ folks:

Postfix is not configured to route PROBE-style bounced mail for LISTSERV, which probably means that you have some invalid addresses on your LISTSERV lists that aren’t getting auto-deleted. Instructions for that would be as follows: Modify /etc/postfix/ to add a transport for LISTSERV:

lsvamin   unix -        n       n       -       -       pipe

  flags=F user=listserv argv=/usr/local/bin/lsv_amin /home/listserv/spool ${user}

Now create a new file called /etc/postfix/transport_regexp. In that file, add two lines as follows:

/^owner(.*)\@/ lsvamin:
/(.*)-request@/ lsvamin:

This regex tells Postfix to send any mail addressed to <owner*> or <-request> to the lsvamin transport that you defined in the previous step. It will match any Return-Path that begins with owner or *-request – i.e., LISTSERV bounced mail. (I don’t know if that will interfere with any Mailman mail; you’ll want to make sure of that first.) Save the transport_regexp file, and create a transport map database from it:

# postmap /etc/postfix/transport_regexp
# ls -lrt /etc/postfix/transport_regexp*
-rw-r--r--  1 root root    44 Jun 15 12:57 /etc/postfix/transport_regexp
-rw-r--r--  1 root root 12288 Jul  6 12:46 /etc/postfix/transport_regexp.db

Next, we need to tell Postfix to use the new regexp. Open /etc/postfix/, and find the line for local_recipient_maps. Edit that line to include $transport_maps. For example:

local_recipient_maps = unix:passwd.byname $alias_maps $transport_maps

Then either add or edit your transport_maps line to include the new transport_regexp that you've created:

transport_maps = regexp:/etc/postfix/transport_regexp
lsvamin_destination_recipient_limit = 1

Save your edited, and you're finished. Restart postfix to activate the changes. (postfix/bounce handling)

Change History (2)

comment:1 Changed 7 weeks ago by

Just to update - the concern re: backups has been resolved.

comment:2 Changed 7 weeks ago by

  • Owner set to
  • Status changed from new to assigned

I'm sorry this got lost in the holiday shuffle.

Currently, this functionality is handled via /etc/aliases and /etc/postfix/virtual (it has been manually added for each list). The mailman aliases are added to /var/lib/mailman/data/virtual-mailman (I think those are created/deleted automatically by the mailman add list command).

It may no longer be working? Or perhaps you were testing with a list that was not created yet?

I don't think the listserv support suggestion is the best method for us - since we use transport maps as a way of handling outgoing email using our bulk relay servers.

I'd suggest debugging why you are not getting the proper behavior given the current method of handling it and perhaps tweaking or adding stanzas to /etc/aliases and /etc/postfix/virtual.

morales does not have any postfix configuration in puppet - it is all handled manually. So, you are free to experiment with these changes without worrying about them being overwritten by puppet.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.