Hi, I have two scenarii where I would like to know how an e-mail address delivers. One of those scenarii is:
I extract e-mail address from various databases for the various services of our system (ranging from the USENET news server to fax to e-mail gateway) then create a (Mailman) mailing-list with it. Unfortunately, some of the users (including me) receive quite a bit of duplicates. It could be handy to be able to remove duplicates from that list, e.g. by knowing what e-mail address it ultimately delivers to. For example, on my big list I have: ad...@some-domain.ch admi...@alphanet.ch www...@alphanet.ch fax...@alphanet.ch pbxad...@alphanet.ch they all get ultimately (through /etc/aliases, vmailbox, .forward) to \schaefer. sendmail -bv helps: However, it is not easily usable in a script AFAIK. shakotay:/home/schaefer# sendmail -bv pbxad...@alphanet.ch Mail Delivery Status Report will be mailed to <root>. which then gives (among others): <schae...@alphanet.ch> (expanded from <pbxad...@alphanet.ch>): delivery via local: delivers to file: /home/schaefer/Mail/mail.received That "schae...@alphanet.ch" is the info I need. Is there anyway to do that, either through an installed shell command (Version: 2.7.1-1+squeeze1 or even a later version), or through an API ? Or does the multi-threaded very confined approach of Postfix makes this impossible ? In that case I could resort to heuristics, parsing /etc/aliases, /etc/postfix/* myself. Thank you for any input!