Virtual Users And Domains With Postfix, Courier And MySQL - Email groups

Discussion in 'HOWTO-Related Questions' started by Maxum, May 10, 2007.

  1. Maxum

    Maxum New Member

    I have set this up using the how to on a box running Etch. I am trying to create email groups using the forwarding database. The groups create fine however people get multiple emails if the are in more than one group.

    IE.

    Group 1 has:
    bob
    fred

    Group 2 has:
    bob
    mary

    If an email is sent to both group 1 and 2 bob will get 2 emails.

    Is there a way to change the configuration so it will not do this?
     
  2. falko

    falko Super Moderator

    What exactly did you put in the forward table?

    Are there any errors in your mail log?
     
  3. Maxum

    Maxum New Member

    There doesn't seem to be any errors in the mail log. Here is a copy of an email that was sent to two groups with the same users:

    May 11 07:45:00 oldsmobile postfix/qmgr[3723]: 641D04BB43: from=<erinh@bcbudget.com>, size=2576, nrcpt=4 (queue active)
    May 11 07:45:00 oldsmobile postfix/virtual[6527]: 641D04BB43: to=<erinh@bcbudget.com>, orig_to=<it@bcbudget.com>, relay=virtual, delay=0.34, delays=0.02/0/0/0.31, dsn=2.0.0, status=sent (delivered to maildir)
    May 11 07:45:00 oldsmobile postfix/virtual[6530]: 641D04BB43: to=<marlese.neaves@bcbudget.com>, orig_to=<root@bcbudget.com>, relay=virtual, delay=0.35, delays=0.02/0.03/0/0.3, dsn=2.0.0, status=sent (delivered to maildir)
    May 11 07:45:00 oldsmobile postfix/virtual[6529]: 641D04BB43: to=<erinh@bcbudget.com>, orig_to=<root@bcbudget.com>, relay=virtual, delay=0.35, delays=0.02/0.02/0/0.3, dsn=2.0.0, status=sent (delivered to maildir)
    May 11 07:45:00 oldsmobile postfix/virtual[6526]: 641D04BB43: to=<marlese.neaves@bcbudget.com>, orig_to=<it@bcbudget.com>, relay=virtual, delay=0.37, delays=0.02/0/0/0.35, dsn=2.0.0, status=sent (delivered to maildir)
    May 11 07:45:00 oldsmobile postfix/qmgr[3723]: 641D04BB43: removed
    May 11 07:45:02 oldsmobile postfix/smtpd[6521]: disconnect from unknown[10.20.2.5]

    The mail.warn, mail.err, mail.info, mysql.err, mysql, messages and syslog are all error free as well.

    I have been adding groups with the web interface for phpmyadmin. The sql statement is as follows:
    SQL query: INSERT INTO `forwardings` ( `source` , `destination` )
    VALUES (
    'testgroup@bcbudget.com', 'bob@bcbudget.com fred@bcbudget.com joe@bcbudget.com'
    );


    The postfix web site explains this behaviour as follows
    “Postfix sends duplicate mail
    Some people will complain that Postfix sends duplicate messages. This happens whenever one message is mailed to multiple addresses that reach the same user. Examples of such scenarios are:
    • One message is sent to the user, and to an alias that lists the user. The user receives one copy of the mail directly, and one copy via the alias.
    • One message is sent to multiple aliases that list the user. The user receives one copy of the mail via each alias.
    Some people will even argue that this is the "right" behavior. It is probably more a matter of expectation and of what one is used to.
    This can be "fixed" only by making Postfix slower. In the above examples, Postfix would first have to completely expand all distribution lists before starting any delivery. By design, Postfix delivers mail to different destinations in parallel, and local delivery is no exception. This is why Postfix can be faster than sendmail. “

    I haven't been able to find a way to make postfix expand the distribution lists.
     

Share This Page