Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Exim sends message twice if alias points to itself

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


temmokan at gmail

May 3, 2008, 3:39 AM

Post #1 of 18 (483 views)
Permalink
Exim sends message twice if alias points to itself

Greetings,

I have switched from Sendmail to Exim and would like to handle this situation:

In /etc/aliases:

userlist: :include:/path/to/a/file

Whereas the /path/to/a/file contains this:

userlist
user1
user2

I.e., userlist is both local account and forwarder. In such a case,
any email sent to

userlist[at]example.com

comes *twice* to all the mailboxes mentioned in /path/to/a/file.

Sendmail handles that, suppressing duplicate messages. How can one
suppress the duplicates in Exim without creating an alternate local
accounts with names different from forwarders?

Thanks.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 3, 2008, 4:12 AM

Post #2 of 18 (467 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

Konstantin Boyandin <temmokan[at]gmail.com> (Sa 03 Mai 2008 12:39:44 CEST):
> Greetings,
>
> I have switched from Sendmail to Exim and would like to handle this situation:
>
> In /etc/aliases:
>
> userlist: :include:/path/to/a/file
>
> Whereas the /path/to/a/file contains this:
>
> userlist
> user1
> user2
>
> I.e., userlist is both local account and forwarder. In such a case,
> any email sent to
>
> userlist[at]example.com
>
> comes *twice* to all the mailboxes mentioned in /path/to/a/file.
>
> Sendmail handles that, suppressing duplicate messages. How can one
> suppress the duplicates in Exim without creating an alternate local
> accounts with names different from forwarders?

Hm.
I've just constructed such case:

# head -1 /etc/aliases
mobst: :include:/tmp/mobst

# cat /tmp/mobst
mobst (it's a local user)
heiko (it's a local user)


# exim4 -v -bv mobst
heiko[at]jumper.schlittermann.de
<-- mobst[at]jumper.schlittermann.de
router = localuser, transport = local_delivery
mobst[at]jumper.schlittermann.de
<-- mobst[at]jumper.schlittermann.de
router = localuser, transport = local_delivery


# exim4 -bV
Exim version 4.68 #1 built 03-Nov-2007 08:11:35
Copyright (c) University of Cambridge 2006
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
Configuration file is /etc/exim4/exim4.conf


So - I can't see that duplicate delivery *would* happen. What does
'exim4 -v -bV' show on your system?

Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachments: signature.asc (0.18 KB)


dot at dotat

May 3, 2008, 1:45 PM

Post #3 of 18 (457 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

On Sat, 3 May 2008, Konstantin Boyandin wrote:
>
> In /etc/aliases:
>
> userlist: :include:/path/to/a/file
>
> Whereas the /path/to/a/file contains this:
>
> userlist
> user1
> user2
>
> I.e., userlist is both local account and forwarder. In such a case,
> any email sent to
>
> userlist[at]example.com
>
> comes *twice* to all the mailboxes mentioned in /path/to/a/file.

Have a look at the check_ancestor and repeat_use options.

Tony.
--
<fanf[at]exim.org> <dot[at]dotat.at> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 4, 2008, 12:58 AM

Post #4 of 18 (451 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

(you should take care to "group reply" (or "list reply") if you do not
intend to send a personal message. And I'd suppose that your message
wasn't meant as personal.)

Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 01:23:18 CEST):
> Hello,
>
> 2008/5/3 Heiko Schlittermann <hs[at]schlittermann.de>:
> >
> > # exim4 -v -bv mobst
> > heiko[at]jumper.schlittermann.de
> > <-- mobst[at]jumper.schlittermann.de
> > router = localuser, transport = local_delivery
> > mobst[at]jumper.schlittermann.de
> > <-- mobst[at]jumper.schlittermann.de
> > router = localuser, transport = local_delivery
> >
> >
> > # exim4 -bV
> > Exim version 4.68 #1 built 03-Nov-2007 08:11:35
> > Copyright (c) University of Cambridge 2006
> > Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
> > Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages Content_Scanning Old_Demime
> > Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
> > Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
> > Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
> > Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> > Fixed never_users: 0
> > Size of off_t: 8
> > Configuration file is /etc/exim4/exim4.conf
> >
> > So - I can't see that duplicate delivery *would* happen. What does
> > 'exim4 -v -bV' show on your system?
>
> [root[at]monstera ~]# exim -v -bV
> Exim version 4.62 #1 built 02-May-2006 07:36:25
> Copyright (c) University of Cambridge 2006
> Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (March 24, 2006)
> Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
> Content_Scanning Old_Demime
> Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
> dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 nisplus passwd pgsql
> sqlite
> Authenticators: cram_md5 cyrus_sasl plaintext spa
> Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> Fixed never_users: 0
> Size of off_t: 8
> Configuration file is /etc/exim/exim.conf

Ok, and what does

exim4 -v -bv userlist

tell you? Do you have the dups there already?

(Your Exim version is a bit historic, but aliases and forwarding
is stuff already known for long time, so I'd think there should be no
relevant bug.)

Maybe you can attach your config file too, since I'd guess that it is a
config problem you're fighting with.


Best regards from Dresden/Germany
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachments: signature.asc (0.18 KB)


temmokan at gmail

May 4, 2008, 1:18 AM

Post #5 of 18 (452 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

2008/5/4 Heiko Schlittermann <hs[at]schlittermann.de>:
> (you should take care to "group reply" (or "list reply") if you do not
> intend to send a personal message. And I'd suppose that your message
> wasn't meant as personal.)

Sorry, mea culpa, I will be more careful.

> Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 01:23:18 CEST):
>
> > Hello,
> >
> > 2008/5/3 Heiko Schlittermann <hs[at]schlittermann.de>:
> > >
>
>
> > > # exim4 -v -bv mobst
> > > heiko[at]jumper.schlittermann.de
> > > <-- mobst[at]jumper.schlittermann.de
> > > router = localuser, transport = local_delivery
> > > mobst[at]jumper.schlittermann.de
> > > <-- mobst[at]jumper.schlittermann.de
> > > router = localuser, transport = local_delivery
> > >
> > >
> > > # exim4 -bV
> > > Exim version 4.68 #1 built 03-Nov-2007 08:11:35
> > > Copyright (c) University of Cambridge 2006
> > > Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (September 6, 2005)
> > > Support for: crypteq iconv() IPv6 PAM Perl GnuTLS move_frozen_messages Content_Scanning Old_Demime
> > > Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 passwd pgsql sqlite
> > > Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
> > > Routers: accept dnslookup ipliteral iplookup manualroute queryprogram redirect
> > > Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> > > Fixed never_users: 0
> > > Size of off_t: 8
> > > Configuration file is /etc/exim4/exim4.conf
> > >
> > > So - I can't see that duplicate delivery *would* happen. What does
> > > 'exim4 -v -bV' show on your system?
> >
> > [root[at]monstera ~]# exim -v -bV
> > Exim version 4.62 #1 built 02-May-2006 07:36:25
> > Copyright (c) University of Cambridge 2006
> > Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (March 24, 2006)
> > Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
> > Content_Scanning Old_Demime
> > Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
> > dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 nisplus passwd pgsql
> > sqlite
> > Authenticators: cram_md5 cyrus_sasl plaintext spa
> > Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> > Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> > Fixed never_users: 0
> > Size of off_t: 8
> > Configuration file is /etc/exim/exim.conf
>
> Ok, and what does
>
> exim4 -v -bv userlist
>
> tell you? Do you have the dups there already?

Yes, I have:

[root[at]monstera lists]# exim -v -bv userlist
user1[at]itelsib.com
<-- itelsib-adm[at]itelsib.com
router = localuser, transport = local_delivery
user2[at]itelsib.com
<-- itelsib-adm[at]itelsib.com
router = localuser, transport = local_delivery
userlist[at]itelsib.com
<-- itelsib-adm[at]itelsib.com
router = localuser, transport = local_delivery

> (Your Exim version is a bit historic, but aliases and forwarding
> is stuff already known for long time, so I'd think there should be no
> relevant bug.)

I have installed the Exim with yum, thisis why it can be somewhat out-of-date

> Maybe you can attach your config file too, since I'd guess that it is a
> config problem you're fighting with.

I insert the whole config below, comments mostly removed

------------------ Exim conf below

######################################################################
# Runtime configuration file for Exim #
######################################################################

queue_list_requires_admin = false

primary_hostname = example.com

domainlist local_domains = @ : example.ru : monstera.local : localhost
: localhost.localdomain
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1 : 10.0.0.0/24
hostlist auth_relay_hosts = *


acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

av_scanner = clamd:/var/run/clamd.exim/clamd.sock

tls_advertise_hosts = *

tls_certificate = /etc/pki/tls/certs/exim.pem
tls_privatekey = /etc/pki/tls/private/exim.pem

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465

never_users = root

host_lookup = *

auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}

rfc1413_hosts = *
rfc1413_query_timeout = 5s


ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d

######################################################################
# ACL CONFIGURATION #
# Specifies access control lists for incoming SMTP mail #
######################################################################

begin acl

acl_check_mail:

deny condition = ${if eq{$sender_helo_name}{} {1}}
message = Nice boys say HELO first

accept

.acl_check_rcpt:

accept hosts = :

deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]

deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

accept local_parts = *
domains = +local_domains

require verify = sender

accept hosts = +relay_from_hosts
control = submission

accept authenticated = *
control = submission

require message = relay not permitted
domains = +local_domains : +relay_to_domains

require verify = recipient

accept

acl_check_data:

accept

acl_check_mime:

deny message = Blacklisted file extension detected
condition = ${if match \
{${lc:$mime_filename}} \
{\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
{1}{0}}

accept


######################################################################
# ROUTERS CONFIGURATION #
# Specifies how addresses are handled #
######################################################################
# THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! #
# An address is passed to each router in turn until it is accepted. #
######################################################################

begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

system_aliases:
driver = redirect
check_ancestor = true
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
file_transport = address_file
pipe_transport = address_pipe

#
# DSPAM-related routers start
#

dspam_router:
no_verify
check_local_user
# When to scan a message :
# - it isn't already flagged as spam from Spamassassin
# - it isn't already flagged as spam from DSPAM
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
# - it is less than 2048k in size
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!def:h_X-FILTER-DSPAM:} \
{!eq {$received_protocol}{local}} \
{ <= {$message_size}{2048k}} \
}\
{1}{0}}"
headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
driver = accept
transport = dspam_spamcheck
# Which users to run dspam for.
#local_parts = /usr/local/etc/exim/dspam-testers

dspam_addspam_router:
driver = accept
local_part_prefix = spam-
transport = dspam_addspam

dspam_falsepositive_router:
driver = accept
local_part_prefix = nospam-
transport = dspam_falsepositive

#
# DSPAM-related routers end
#

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

procmail:
driver = accept
check_local_user
require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
transport = procmail
no_verify

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user


######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
# ORDER DOES NOT MATTER #
# Only one appropriate transport is called for each delivery. #
######################################################################

begin transports

remote_smtp:
driver = smtp
transport_filter = /etc/mail/headers-rewrite

procmail:
driver = pipe
command = "/usr/bin/procmail -d $local_part"
return_path_add
delivery_date_add
envelope_to_add
user = $local_part
initgroups
return_output

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply

#
# DSPAM transports start
#

dspam_spamcheck:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --mode=teft
--feature=noise,whitelist --debug --deliver=innocent,spam --user
${lc:$local_part} -f \
'$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

dspam_addspam:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --debug --class=spam
--source=error --user \
${lc:$local_part} -f '$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

dspam_falsepositive:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --debug
--class=innocent --source=error \
--deliver=innocent,spam --user ${lc:$local_part}\
-f '$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

#
# DSPAM transports end
#

######################################################################
# RETRY CONFIGURATION #
######################################################################

begin retry

* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

######################################################################
# REWRITE CONFIGURATION #
######################################################################

begin rewrite

######################################################################
# AUTHENTICATION CONFIGURATION #
######################################################################

begin authenticators

PLAIN:
driver = plaintext
server_set_id = $auth2
server_prompts = :
server_condition = ${if saslauthd{{$2}{$3}{smtp}} {1}}
server_advertise_condition = ${if def:tls_cipher }

------------------ Exim conf above

Thanks.

With all respect,

Konstantin

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 4, 2008, 1:35 AM

Post #6 of 18 (451 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 10:18:36 CEST):
> >
> > exim4 -v -bv userlist
> > tell you? Do you have the dups there already?
>
> Yes, I have:
>
> [root[at]monstera lists]# exim -v -bv userlist
> user1[at]itelsib.com
> <-- itelsib-adm[at]itelsib.com
> router = localuser, transport = local_delivery
> user2[at]itelsib.com
> <-- itelsib-adm[at]itelsib.com
> router = localuser, transport = local_delivery
> userlist[at]itelsib.com
> <-- itelsib-adm[at]itelsib.com
> router = localuser, transport = local_delivery

Where do you see the dups here? I do not.
And I tested it in my setup with sending a real mail and didn't get
dups. (This I did just to prove that there is no difference between
that what 'exim -v -bv' tells and a real delivery.)

> > Maybe you can attach your config file too, since I'd guess that it is a
> > config problem you're fighting with.
>
> I insert the whole config below, comments mostly removed
>
> ------------------ Exim conf below
>

Thanks. On the first view I do not see any unusual.
And the output of '-v -bv' looks good as well. So, how are you sure
about duplicate deliveries? Who gets the duplicates? All three (user1,
user2, and userlist)?

Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachments: signature.asc (0.18 KB)


temmokan at gmail

May 4, 2008, 1:52 AM

Post #7 of 18 (451 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

> > > exim4 -v -bv userlist
> > > tell you? Do you have the dups there already?
> >
> > Yes, I have:
> >
> > [root[at]monstera lists]# exim -v -bv userlist
> > user1[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
> > user2[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
> > userlist[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
>
> Where do you see the dups here? I do not.
> And I tested it in my setup with sending a real mail and didn't get
> dups. (This I did just to prove that there is no difference between
> that what 'exim -v -bv' tells and a real delivery.)

Well, yes, the above doesn't show the duplicates.

> > > Maybe you can attach your config file too, since I'd guess that it is a
> > > config problem you're fighting with.
> >
> > I insert the whole config below, comments mostly removed
> >
> > ------------------ Exim conf below
> >
>
> Thanks. On the first view I do not see any unusual.
> And the output of '-v -bv' looks good as well. So, how are you sure
> about duplicate deliveries? Who gets the duplicates? All three (user1,
> user2, and userlist)?

user1 and user2 get the duplicates, userlist gets the only message (as
expected).

The duplicates differ in the only header field (save references to
Message-Id). One of them contains

Received: from exim by example.com with local (Exim 4.62)
(envelope-from <user1[at]example.com>)
id 1JsZny-0002Ee-Rj
for userlist[at]example.com; Sun, 04 May 2008 15:42:46 +0700

whereas the other

Received: from exim by example.com with local (Exim 4.62)
(envelope-from <user1[at]example.com>)
id 1JsZnz-0002Ez-4F
for user1[at]example.com; Sun, 04 May 2008 15:42:47 +0700

I'm quite at a loss.

All the best,

Konstantin

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


temmokan at gmail

May 4, 2008, 3:22 PM

Post #8 of 18 (438 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

2008/5/4 Heiko Schlittermann <hs[at]schlittermann.de>:
> Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 10:18:36 CEST):
> > [root[at]monstera lists]# exim -v -bv userlist
> > user1[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
> > user2[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
> > userlist[at]itelsib.com
> > <-- itelsib-adm[at]itelsib.com
> > router = localuser, transport = local_delivery
>
> Where do you see the dups here? I do not.
> And I tested it in my setup with sending a real mail and didn't get
> dups. (This I did just to prove that there is no difference between
> that what 'exim -v -bv' tells and a real delivery.)

I'm still not sure why the messages are duplicated. May anyone explain
how one can see the whole logic of choosing routers and calling
transports for a given address?

With all respect,

Konstantin

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 4, 2008, 3:45 PM

Post #9 of 18 (438 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Konstantin Boyandin <temmokan[at]gmail.com> (Mo 05 Mai 2008 00:22:08 CEST):
> Hello,
>
> 2008/5/4 Heiko Schlittermann <hs[at]schlittermann.de>:
> > Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 10:18:36 CEST):
> > > [root[at]monstera lists]# exim -v -bv userlist
> > > user1[at]itelsib.com
> > > <-- itelsib-adm[at]itelsib.com
> > > router = localuser, transport = local_delivery
> > > user2[at]itelsib.com
> > > <-- itelsib-adm[at]itelsib.com
> > > router = localuser, transport = local_delivery
> > > userlist[at]itelsib.com
> > > <-- itelsib-adm[at]itelsib.com
> > > router = localuser, transport = local_delivery
> >
> > Where do you see the dups here? I do not.
> > And I tested it in my setup with sending a real mail and didn't get
> > dups. (This I did just to prove that there is no difference between
> > that what 'exim -v -bv' tells and a real delivery.)
>
> I'm still not sure why the messages are duplicated. May anyone explain
> how one can see the whole logic of choosing routers and calling
> transports for a given address?

you may test

exim -d-all+route -v -bv userlist

(And I didn't have time to check your config file more in depth...)

Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachments: signature.asc (0.18 KB)


temmokan at gmail

May 5, 2008, 1:16 AM

Post #10 of 18 (433 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

JFYI: I have tried to build brand-new Exim 4.69 out of sources. It
exhibits exactly the same behavior.

2008/5/5 Heiko Schlittermann <hs[at]schlittermann.de>:
> Konstantin Boyandin <temmokan[at]gmail.com> (Mo 05 Mai 2008 00:22:08 CEST):
>
> > Hello,
> >
> > 2008/5/4 Heiko Schlittermann <hs[at]schlittermann.de>:
> > > Konstantin Boyandin <temmokan[at]gmail.com> (So 04 Mai 2008 10:18:36 CEST):
> > > > [root[at]monstera lists]# exim -v -bv userlist
> > > > user1[at]itelsib.com
> > > > <-- itelsib-adm[at]itelsib.com
> > > > router = localuser, transport = local_delivery
> > > > user2[at]itelsib.com
> > > > <-- itelsib-adm[at]itelsib.com
> > > > router = localuser, transport = local_delivery
> > > > userlist[at]itelsib.com
> > > > <-- itelsib-adm[at]itelsib.com
> > > > router = localuser, transport = local_delivery
> > >
> > > Where do you see the dups here? I do not.
> > > And I tested it in my setup with sending a real mail and didn't get
> > > dups. (This I did just to prove that there is no difference between
> > > that what 'exim -v -bv' tells and a real delivery.)
> >
> > I'm still not sure why the messages are duplicated. May anyone explain
> > how one can see the whole logic of choosing routers and calling
> > transports for a given address?
>
> you may test
>
> exim -d-all+route -v -bv userlist
>
> (And I didn't have time to check your config file more in depth...)

I include both exim.conf and the result of the command 'exim
-d-all+route -v -bv userlist' below:

========= exim.conf below
######################################################################
# Runtime configuration file for Exim #
######################################################################

queue_list_requires_admin = false

######################################################################
# MAIN CONFIGURATION SETTINGS #
######################################################################

primary_hostname = example.com

# The next three settings create two lists of domains and one list of hosts.
# These lists are referred to later in this configuration using the syntax
# +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
# are all colon-separated lists:

domainlist local_domains = @ : monstera.local : localhost :
localhost.localdomain
domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1 : 10.1.0.0/24
hostlist auth_relay_hosts = *

acl_smtp_mail = acl_check_mail
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_data
acl_smtp_mime = acl_check_mime

av_scanner = clamd:/var/run/clamd.exim/clamd.sock

# Allow any client to use TLS.

tls_advertise_hosts = *

tls_certificate = /etc/pki/tls/certs/exim.pem
tls_privatekey = /etc/pki/tls/private/exim.pem

daemon_smtp_ports = 25 : 465 : 587
tls_on_connect_ports = 465


never_users = root

host_lookup = *

auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}

rfc1413_hosts = *
rfc1413_query_timeout = 5s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

begin acl

acl_check_mail:

deny condition = ${if eq{$sender_helo_name}{} {1}}
message = Nice boys say HELO first


accept

acl_check_rcpt:

accept hosts = :

deny message = Restricted characters in address
domains = +local_domains
local_parts = ^[.] : ^.*[@%!/|]

deny message = Restricted characters in address
domains = !+local_domains
local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

accept local_parts = *
domains = +local_domains

require verify = sender

accept hosts = +relay_from_hosts
control = submission

accept authenticated = *
control = submission

require message = relay not permitted
domains = +local_domains : +relay_to_domains

require verify = recipient

accept

acl_check_data:

accept

acl_check_mime:

# File extension filtering.
deny message = Blacklisted file extension detected
condition = ${if match \
{${lc:$mime_filename}} \
{\N(\.exe|\.pif|\.bat|\.scr|\.lnk|\.com)$\N} \
{1}{0}}

accept


begin routers

dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more

system_aliases:
driver = redirect
allow_fail
allow_defer
data = ${lookup{$local_part}lsearch{/etc/aliases}}
# user = exim
check_ancestor = true
# repeat_use = false
file_transport = address_file
pipe_transport = address_pipe

dspam_router:
no_verify
check_local_user
# When to scan a message :
# - it isn't already flagged as spam from Spamassassin
# - it isn't already flagged as spam from DSPAM
# - it isn't already scanned
# - it isn't local
# - it isn't from one internal domain user to another
# - it is less than 2048k in size
condition = "${if and { \
{!def:h_X-Spam-Flag:} \
{!def:h_X-FILTER-DSPAM:} \
{!eq {$received_protocol}{local}} \
{ <= {$message_size}{2048k}} \
}\
{1}{0}}"
headers_add = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
driver = accept
transport = dspam_spamcheck
# Which users to run dspam for.
#local_parts = /usr/local/etc/exim/dspam-testers

dspam_addspam_router:
driver = accept
local_part_prefix = spam-
transport = dspam_addspam

dspam_falsepositive_router:
driver = accept
local_part_prefix = nospam-
transport = dspam_falsepositive

#
# DSPAM-related routers end
#

userforward:
driver = redirect
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
file = $home/.forward
allow_filter
no_verify
no_expn
check_ancestor = true
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply

procmail:
driver = accept
check_local_user
require_files = ${local_part}:+${home}/.procmailrc:/usr/bin/procmail
transport = procmail
no_verify

localuser:
driver = accept
check_local_user
# local_part_suffix = +* : -*
# local_part_suffix_optional
transport = local_delivery
cannot_route_message = Unknown user

######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
# ORDER DOES NOT MATTER #
# Only one appropriate transport is called for each delivery. #
######################################################################

begin transports

remote_smtp:
driver = smtp
transport_filter = /etc/mail/headers-rewrite

# This transport invokes procmail to deliver mail
procmail:
driver = pipe
command = "/usr/bin/procmail -d $local_part"
return_path_add
delivery_date_add
envelope_to_add
user = $local_part
initgroups
return_output

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0660

address_pipe:
driver = pipe
return_output

address_file:
driver = appendfile
group = mail
delivery_date_add
envelope_to_add
return_path_add

address_reply:
driver = autoreply

#
# DSPAM transports start
#

dspam_spamcheck:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --mode=teft
--feature=noise,whitelist --debug --deliver=innocent,spam --user
${lc:$local_part} -f \
'$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

dspam_addspam:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --debug --class=spam
--source=error --user \
${lc:$local_part} -f '$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

dspam_falsepositive:
driver = pipe
command = "/usr/local/dspam-3.8.0/bin/dspam --debug
--class=innocent --source=error \
--deliver=innocent,spam --user ${lc:$local_part}\
-f '$sender_address' -- %u"
home_directory = "/tmp"
current_directory = "/tmp"
user = exim
group = mail
log_output = true
return_fail_output = true
return_path_add = false
message_prefix =
message_suffix =

#
# DSPAM transports end
#


######################################################################
# RETRY CONFIGURATION #
######################################################################

begin retry

* * F,2h,15m; G,16h,1h,1.5; F,4d,6h

######################################################################
# REWRITE CONFIGURATION #
######################################################################

begin rewrite

begin authenticators

PLAIN:
driver = plaintext
server_set_id = $auth2
server_prompts = :
server_condition = ${if saslauthd{{$2}{$3}{smtp}} {1}}
server_advertise_condition = ${if def:tls_cipher }
========= exim.conf above

========= output of 'exim -d-all+route -v -bv userlist' below
Exim version 4.62 uid=0 gid=0 pid=15199 D=2000001
Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (March 24, 2006)
Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 nisplus passwd pgsql
sqlite
Authenticators: cram_md5 cyrus_sasl plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
configuration file is /etc/exim/exim.conf
log selectors = 00000ffc 00089001
trusted user
admin user
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing userlist[at]example.com
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=userlist domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
expanded: userlist,user1
file is not a filter file
parse_forward_list: userlist,user1
extract item: userlist
extract item: user1
system_aliases router generated user1[at]example.com
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
generated parent replaced by child
system_aliases router generated userlist[at]example.com
errors_to=NULL transport=NULL
uid=unset gid=unset home=NULL
routed by system_aliases router
envelope to: userlist[at]example.com
transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing userlist[at]example.com
--------> dnslookup router <--------
local_part=userlist domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
system_aliases router skipped: previously routed userlist[at]example.com
--------> dspam_router router <--------
local_part=userlist domain=example.com
dspam_router router skipped: verify 2 0 0
--------> dspam_addspam_router router <--------
local_part=userlist domain=example.com
dspam_addspam_router router skipped: prefix mismatch
--------> dspam_falsepositive_router router <--------
local_part=userlist domain=example.com
dspam_falsepositive_router router skipped: prefix mismatch
--------> userforward router <--------
local_part=userlist domain=example.com
userforward router skipped: verify 2 0 0
--------> procmail router <--------
local_part=userlist domain=example.com
procmail router skipped: verify 2 0 0
--------> localuser router <--------
local_part=userlist domain=example.com
checking for local user
calling localuser router
localuser router called for userlist[at]example.com
domain = example.com
set transport local_delivery
queued for local_delivery transport: local_part = userlist
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by localuser router
envelope to: userlist[at]example.com
transport: local_delivery
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing user1[at]example.com
--------> dnslookup router <--------
local_part=user1 domain=example.com
checking domains
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=user1 domain=example.com
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for user1[at]example.com
--------> dspam_router router <--------
local_part=user1 domain=example.com
dspam_router router skipped: verify 2 0 0
--------> dspam_addspam_router router <--------
local_part=user1 domain=example.com
dspam_addspam_router router skipped: prefix mismatch
--------> dspam_falsepositive_router router <--------
local_part=user1 domain=example.com
dspam_falsepositive_router router skipped: prefix mismatch
--------> userforward router <--------
local_part=user1 domain=example.com
userforward router skipped: verify 2 0 0
--------> procmail router <--------
local_part=user1 domain=example.com
procmail router skipped: verify 2 0 0
--------> localuser router <--------
local_part=user1 domain=example.com
checking for local user
calling localuser router
localuser router called for user1[at]example.com
domain = example.com
queued for local_delivery transport: local_part = user1
domain = example.com
errors_to=NULL
domain_data=NULL localpart_data=NULL
routed by localuser router
envelope to: user1[at]example.com
transport: local_delivery
>>>>>>>>>>>>>>>> Exim pid=15199 terminating with rc=0 >>>>>>>>>>>>>>>>
========= output of 'exim -d-all+route -v -bv userlist' above

The string in /eetc/aliases is

userlist: userlist,user1

I am at my wits' end. No combination of

check_ancestor
and
repeat_use

in system_aliases router seems to work. Any advise on where to look
for possible cause of this problem could be very appreciated. I have
no desire to downgrade back to Sendmail.

Thanks.

All the best,

Konstantin

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


wbh at conducive

May 5, 2008, 1:54 AM

Post #11 of 18 (432 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Konstantin Boyandin wrote:
> Hello,
>
> JFYI: I have tried to build brand-new Exim 4.69 out of sources. It
> exhibits exactly the same behavior.
>

E.G. - does what you tell it to do....

*snip*

> .... I have no desire to downgrade back to Sendmail.
>

In some ways you already have done.

i.e. you are using Exim's *flexibility* to have it do things the way you
are accustomed to, instead of using Exim's particular *strengths* to do
them differently - and hopefully better.

Changing that will need some study and experimentation, but I would
suggest you seek 'more meat' in acl's and less in router/transport and
system filters.

You should be able to operate completely without procmail, for example.

'Seek and ye shall find...'

(a myriad of answers - none perfect, but many 'less wrong' than others..)

;-)

Bill


--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 5, 2008, 1:59 AM

Post #12 of 18 (431 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello Konstantin,

Konstantin Boyandin <temmokan[at]gmail.com> (Mo 05 Mai 2008 10:16:45 CEST):
> ========= output of 'exim -d-all+route -v -bv userlist' below
> Exim version 4.62 uid=0 gid=0 pid=15199 D=2000001
> Berkeley DB: Sleepycat Software: Berkeley DB 4.3.29: (March 24, 2006)
> Support for: crypteq iconv() IPv6 PAM Perl TCPwrappers OpenSSL
> Content_Scanning Old_Demime
> Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
> dnsdb dsearch ldap ldapdn ldapm mysql nis nis0 nisplus passwd pgsql
> sqlite
> Authenticators: cram_md5 cyrus_sasl plaintext spa
> Routers: accept dnslookup ipliteral manualroute queryprogram redirect
> Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
> Fixed never_users: 0
> Size of off_t: 8
> configuration file is /etc/exim/exim.conf
> log selectors = 00000ffc 00089001
> trusted user
> admin user
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> routing userlist[at]example.com
> --------> dnslookup router <--------
> local_part=userlist domain=example.com
> checking domains
> dnslookup router skipped: domains mismatch
> --------> system_aliases router <--------
> local_part=userlist domain=example.com
> calling system_aliases router
> rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
> expanded: userlist,user1
> file is not a filter file
> parse_forward_list: userlist,user1
> extract item: userlist
> extract item: user1
> system_aliases router generated user1[at]example.com
> errors_to=NULL transport=NULL
> uid=unset gid=unset home=NULL
> generated parent replaced by child
> system_aliases router generated userlist[at]example.com
> errors_to=NULL transport=NULL
> uid=unset gid=unset home=NULL
> routed by system_aliases router
> envelope to: userlist[at]example.com
> transport: <none>

** so it's not transported, just "redirected" to the new addresses
"userlist" and "user1"

> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> routing userlist[at]example.com
> --------> dnslookup router <--------
> local_part=userlist domain=example.com
> checking domains
> dnslookup router skipped: domains mismatch
> --------> system_aliases router <--------
> system_aliases router skipped: previously routed userlist[at]example.com
> --------> dspam_router router <--------
> local_part=userlist domain=example.com
> dspam_router router skipped: verify 2 0 0
> --------> dspam_addspam_router router <--------
> local_part=userlist domain=example.com
> dspam_addspam_router router skipped: prefix mismatch
> --------> dspam_falsepositive_router router <--------
> local_part=userlist domain=example.com
> dspam_falsepositive_router router skipped: prefix mismatch
> --------> userforward router <--------
> local_part=userlist domain=example.com
> userforward router skipped: verify 2 0 0
> --------> procmail router <--------
> local_part=userlist domain=example.com
> procmail router skipped: verify 2 0 0
> --------> localuser router <--------
> local_part=userlist domain=example.com
> checking for local user
> calling localuser router
> localuser router called for userlist[at]example.com
> domain = example.com
> set transport local_delivery
> queued for local_delivery transport: local_part = userlist
> domain = example.com
> errors_to=NULL
> domain_data=NULL localpart_data=NULL
> routed by localuser router
> envelope to: userlist[at]example.com
> transport: local_delivery
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

** this will be now put into the local mailbox for "userlist"

> routing user1[at]example.com
> --------> dnslookup router <--------
> local_part=user1 domain=example.com
> checking domains
> dnslookup router skipped: domains mismatch
> --------> system_aliases router <--------
> local_part=user1 domain=example.com
> calling system_aliases router
> rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
> expanded:
> file is not a filter file
> parse_forward_list:
> system_aliases router declined for user1[at]example.com
> --------> dspam_router router <--------
> local_part=user1 domain=example.com
> dspam_router router skipped: verify 2 0 0
> --------> dspam_addspam_router router <--------
> local_part=user1 domain=example.com
> dspam_addspam_router router skipped: prefix mismatch
> --------> dspam_falsepositive_router router <--------
> local_part=user1 domain=example.com
> dspam_falsepositive_router router skipped: prefix mismatch
> --------> userforward router <--------
> local_part=user1 domain=example.com
> userforward router skipped: verify 2 0 0
> --------> procmail router <--------
> local_part=user1 domain=example.com
> procmail router skipped: verify 2 0 0
> --------> localuser router <--------
> local_part=user1 domain=example.com
> checking for local user
> calling localuser router
> localuser router called for user1[at]example.com
> domain = example.com
> queued for local_delivery transport: local_part = user1
> domain = example.com
> errors_to=NULL
> domain_data=NULL localpart_data=NULL
> routed by localuser router
> envelope to: user1[at]example.com
> transport: local_delivery

** and this into the local mailbox for "user1"


I'm really sorry, but still I can't see any duplication here. There has
to be something else duplicating the messages...

Would it be possible to access your system via SSH?
May be I can have a look on site. (Not now, but in the
evening, around 20:00 UTC). For details please contact me via
personal mail.


Best regards from Dresden
Viele Grüße aus Dresden
Heiko Schlittermann
--
SCHLITTERMANN.de ---------------------------- internet & unix support -
Heiko Schlittermann HS12-RIPE -----------------------------------------
gnupg encrypted messages are welcome - key ID: 48D0359B ---------------
gnupg fingerprint: 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -
Attachments: signature.asc (0.18 KB)


temmokan at gmail

May 5, 2008, 2:13 AM

Post #13 of 18 (431 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

I have found that removing DSPAM routers altogether (thus, disabling
the DSPAM) eliminates the problem.

Given that, may I ask for an advice on how to relocate/change DSPAM
routers in order they don't cause the double delivery?

Thank you.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


rmk+exim at arm

May 5, 2008, 2:14 AM

Post #14 of 18 (432 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

On Sun, May 04, 2008 at 03:52:50PM +0700, Konstantin Boyandin wrote:
> user1 and user2 get the duplicates, userlist gets the only message (as
> expected).
>
> The duplicates differ in the only header field (save references to
> Message-Id). One of them contains
>
> Received: from exim by example.com with local (Exim 4.62)
> (envelope-from <user1[at]example.com>)
> id 1JsZny-0002Ee-Rj
> for userlist[at]example.com; Sun, 04 May 2008 15:42:46 +0700

This line says that you got this message via the <userlist[at]example.com>
address.

> Received: from exim by example.com with local (Exim 4.62)
> (envelope-from <user1[at]example.com>)
> id 1JsZnz-0002Ez-4F
> for user1[at]example.com; Sun, 04 May 2008 15:42:47 +0700

And this one via the <user1[at]example.com> address.

I've not seen you post any log lines showing your problem yet, so...

I've just setup a similar scenario to your first email:

# exim -bt userlist
userlist[at]example.com is undeliverable: Unknown user
<-- userlist[at]example.com
linux[at]example.com
<-- userlist[at]example.com
router = procmailuser, transport = procmail_delivery
rmk[at]example.com
<-- userlist[at]example.com
router = procmailuser, transport = procmail_delivery

What you need to do is to look in the exim main log file to find out
what's going on. You should have something like:

2008-05-05 10:08:03 1Jswfz-0002oj-8q <= linux[at]example.com U=linux P=local S=596 id=20080505090802.GC5995[at]example.com
2008-05-05 10:08:04 1Jswfz-0002oj-8q ** userlist[at]example.com: Unknown user
2008-05-05 10:08:04 1Jswfz-0002oj-8q => rmk <userlist[at]example.com> R=procmailuser T=procmail_delivery
2008-05-05 10:08:05 1Jswfz-0002oj-8q => linux <userlist[at]example.com> R=procmailuser T=procmail_delivery
2008-05-05 10:08:06 1Jswg1-0002p5-U2 <= <> R=1Jswfz-0002oj-8q U=exim P=local S=1466
2008-05-05 10:08:06 1Jswfz-0002oj-8q Completed
2008-05-05 10:08:07 1Jswg1-0002p5-U2 => linux <linux[at]example.com> R=procmailuser T=procmail_delivery
2008-05-05 10:08:07 1Jswg1-0002p5-U2 Completed

Here, you can see linux@ sent an email to userlist@ which was expanded
to userlist@, rmk@ and linux[at]. The message to userlist@ failed because
no local user of that name exists.

Posting _your_ log lines corresponding to the duplicate messages will
probably show what's going on.

--
Russell King

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


temmokan at gmail

May 5, 2008, 2:15 AM

Post #15 of 18 (433 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

2008/5/5 W B Hacker <wbh[at]conducive.org>:
> Konstantin Boyandin wrote:
> > Hello,
> >
> > JFYI: I have tried to build brand-new Exim 4.69 out of sources. It
> > exhibits exactly the same behavior.
> >
>
> E.G. - does what you tell it to do....
>
> *snip*
>
> > .... I have no desire to downgrade back to Sendmail.
> >
>
> In some ways you already have done.
>
> i.e. you are using Exim's *flexibility* to have it do things the way you
> are accustomed to, instead of using Exim's particular *strengths* to do
> them differently - and hopefully better.
>
> Changing that will need some study and experimentation, but I would
> suggest you seek 'more meat' in acl's and less in router/transport and
> system filters.
>
> You should be able to operate completely without procmail, for example.
>
> 'Seek and ye shall find...'

I have pinpointed the part of the exim.conf (namely, the DSPAM-related
routers) that caused the problem.

After I make this configuration work properly, I continue to replace
sendmail-style logic with Exim-style, wherever possible.

Thanks for your advice.

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


temmokan at gmail

May 5, 2008, 2:27 AM

Post #16 of 18 (431 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

2008/5/5 Russell King <rmk+exim[at]arm.linux.org.uk>:

> On Sun, May 04, 2008 at 03:52:50PM +0700, Konstantin Boyandin wrote:

> What you need to do is to look in the exim main log file to find out
> what's going on. You should have something like:
>
> 2008-05-05 10:08:03 1Jswfz-0002oj-8q <= linux[at]example.com U=linux
P=local S=596 id=20080505090802.GC5995[at]example.com
> 2008-05-05 10:08:04 1Jswfz-0002oj-8q ** userlist[at]example.com: Unknown user
> 2008-05-05 10:08:04 1Jswfz-0002oj-8q => rmk <userlist[at]example.com>
R=procmailuser T=procmail_delivery
> 2008-05-05 10:08:05 1Jswfz-0002oj-8q => linux
<userlist[at]example.com> R=procmailuser T=procmail_delivery
> 2008-05-05 10:08:06 1Jswg1-0002p5-U2 <= <> R=1Jswfz-0002oj-8q
U=exim P=local S=1466
> 2008-05-05 10:08:06 1Jswfz-0002oj-8q Completed
> 2008-05-05 10:08:07 1Jswg1-0002p5-U2 => linux <linux[at]example.com>
R=procmailuser T=procmail_delivery
> 2008-05-05 10:08:07 1Jswg1-0002p5-U2 Completed
>
> Here, you can see linux@ sent an email to userlist@ which was expanded
> to userlist@, rmk@ and linux[at]. The message to userlist@ failed because
> no local user of that name exists.
>
> Posting _your_ log lines corresponding to the duplicate messages will
> probably show what's going on.

Here're the records from main.log related to the problem:

2008-05-05 16:17:59 1Jswpb-0008OH-NU <= user1[at]example.com
H=diamond.local [10.1.0. 54] P=esmtpsa =TLSv1:AES256-SHA:256
A=PLAIN:user1 S=627 id=481ED0C6.3090704[at]example.com
2008-05-05 16:18:00 1Jswpc-0008OP-1k <= user1[at]example.com U=exim
P=local S=1893 id =481ED0C6.3090704[at]example.com
2008-05-05 16:18:00 1Jswpb-0008OH-NU => userlist
<userlist[at]example.com> R=dspam_router T=dspam_spamcheck
2008-05-05 16:18:00 1Jswpc-0008OP-1k => |/usr/bin/procmail
(user1[at]example.com) <userlist[at]example.com> R=userforward
T=address_pipe
2008-05-05 16:18:00 1Jswpc-0008OP-1k => userlist
<userlist[at]example.com> R=localuser T=local_delivery
2008-05-05 16:18:00 1Jswpc-0008OP-1k Completed
2008-05-05 16:18:00 1Jswpc-0008OZ-I1 <= user1[at]example.com U=exim
P=local S=1940 id=481ED0C6.3090704[at]example.com
2008-05-05 16:18:00 1Jswpb-0008OH-NU => user1 <userlist[at]example.com>
R=dspam_router T=dspam_spamcheck
2008-05-05 16:18:00 1Jswpb-0008OH-NU Completed
2008-05-05 16:18:00 1Jswpc-0008OZ-I1 => |/usr/bin/procmail
<user1[at]example.com> R=userforward T=address_pipe
2008-05-05 16:18:00 1Jswpc-0008OZ-I1 Completed

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


temmokan at gmail

May 5, 2008, 2:45 AM

Post #17 of 18 (431 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Hello,

Placing the DSPAM routers above system_aliases router solved the problem.

Thanks to everyone for advice and hints on where to look for the
source of problem.

With all respect,

Konstantin

--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/


hs at schlittermann

May 5, 2008, 2:56 AM

Post #18 of 18 (432 views)
Permalink
Re: Exim sends message twice if alias points to itself [In reply to]

Konstantin Boyandin <temmokan[at]gmail.com> (Mo 05 Mai 2008 11:27:09 CEST):
> Hello,
>
> 2008/5/5 Russell King <rmk+exim[at]arm.linux.org.uk>:
>
> 2008-05-05 16:17:59 1Jswpb-0008OH-NU <= user1[at]example.com H=diamond.local [10.1.0. 54] P=esmtpsa =TLSv1:AES256-SHA:256 A=PLAIN:user1 S=627 id=481ED0C6.3090704[at]example.com
> 2008-05-05 16:18:00 1Jswpc-0008OP-1k <= user1[at]example.com U=exim P=local S=1893 id =481ED0C6.3090704[at]example.com 2008-05-05 16:18:00 1Jswpb-0008OH-NU => userlist <userlist[at]example.com> R=dspam_router T=dspam_spamcheck
> 2008-05-05 16:18:00 1Jswpc-0008OP-1k => |/usr/bin/procmail (user1[at]example.com) <userlist[at]example.com> R=userforward T=address_pipe
> 2008-05-05 16:18:00 1Jswpc-0008OP-1k => userlist <userlist[at]example.com> R=localuser T=local_delivery
> 2008-05-05 16:18:00 1Jswpc-0008OP-1k Completed
> 2008-05-05 16:18:00 1Jswpc-0008OZ-I1 <= user1[at]example.com U=exim P=local S=1940 id=481ED0C6.3090704[at]example.com
> 2008-05-05 16:18:00 1Jswpb-0008OH-NU => user1 <userlist[at]example.com> R=dspam_router T=dspam_spamcheck
> 2008-05-05 16:18:00 1Jswpb-0008OH-NU Completed
> 2008-05-05 16:18:00 1Jswpc-0008OZ-I1 => |/usr/bin/procmail <user1[at]example.com> R=userforward T=address_pipe
> 2008-05-05 16:18:00 1Jswpc-0008OZ-I1 Completed

It seems that your message is injected twice (the first two lines) -
once from your client, and a second time from some local process.

--
HS
Attachments: signature.asc (0.18 KB)

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.