faqts : Computers : Internet : Mail Servers : qmail : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

17 of 21 people (81%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do I stop my fastforward aliases from sending more than one copy of an email to people?
How can I make fastforward suppress duplicates?

Nov 16th, 2000 19:37
Brian Coogan,


The answer to this is to fully qualify the left hand side of the alias 
when you define it in /etc/aliases or equivalent.  If you don't do 
that, fastforward will send one copy for each time a person is 
mentioned within an alias and all subaliases of that alias!  If you do 
fully qualify the left hand side of aliases, fastforward will suppress 
internal duplicates for you just as the documentation says it does.  I 
don't beleive the need to fully qualify the left hand side is 
documented anywhere and I discovered it only through trial and error.
For example, the following will result in three copies of each email 
sent to duplist:
   owner-duplist:          sysman
   duplist:                duplist2, brianc
   duplist2:               brianc, duplist3
   duplist3:               brianc, brianc
Whereas the following almost identically structured alias would result 
in only one copy of each email sent to noduplist:
   # A complex example that produces absolutely no duplicates
   owner-noduplist:                sysman
   noduplist:              noduplist@xxx.com
   noduplist@xxx.com:      noduplist2, brianc
   noduplist2@xxx.com:     brianc, noduplist3
   noduplist3@xxx.com:     brianc, brianc
A couple of points here - the first alias (noduplist: 
noduplist@xxx.com.au) is needed only so the original semantics are 
retained - ie: so email to "noduplist" without the domain will still 
work;  you may not need this for your site.  The owner-noduplist bit 
makes error messages and bounces from the list go to the local system 
admins and again can safely be left out if you don't want it.
Note that qmail will still send two copies to people if you explicitly 
email to more than one alias containing them - this is pretty much 
expected behaviour with qmail, as the (fairly reasonable) answer the 
qmail folk seem to give is that duplicate suppression on that level is 
the job of the mail reader client.  Note that sendmail suppresses both 
the internal alias duplicates as well as suppressing the message if the 
same recipient is mentioned more than once; fastforward only suppresses 
the internal alias duplicates.
We're looking to develop a simple solution which would suppress even 
these duplicates system-wide; I don't want a .qmail/perl solution (such 
as Russ Nelson's duplicate suppression solution given on 
http://www.qmail.org) as it's too easy for users to break or fiddle 
with.  (My problem is with the solution being in people's .qmail files 
rather than being system-wide and automatic)  I'll update this when and 
if we get this done, if you get there first *please* email me!
Subsequent note:
Our /var/qmail/alias/.qmail-default contains:
     | fastforward -d /etc/aliases.cdb
I'm not sure if the -d option changes the default behaviour, the man 
page is unclear.
It seems that the @xxx.com qualification only needs to take place for 
the aliases which actually do the duplication, if that makes sense.