I'm building a mailspool. I'm getting "warning: possible alias database
loop for <user>". I've got a complicated aliases file that works under
sendmail but doesn't produce the right results under postfix.
Here is a snippet of my aliases file (there are more users and there
are more lists):
# people
bob: tech,adm,garglers,\bob,\vin
vin: adm,garglers,\bob,\vin
roger: tech,garglers
phil: \vin,tech,garglers
fxl: \vin,tech,garglers
#lists
tech: \bob,\roger,\fxl,\phil
garglers: \tony,\bob
adm: \phyllis,\chris
everyone: sales,tech,adm,garglers
So when I send mail to bob, I get these sorts of errors in the log files:
May 10 19:55:40 onion postfix/local[8572]: 6A222C0329: to=<b...@some.place.com.au>, relay=local, delay=1, status=bounced (possible alias database loop for bob)
May 10 19:55:40 onion postfix/local[8572]: warning: possible alias database loop for vin
May 10 19:55:40 onion postfix/local[8572]: 6A222C0329: to=<v...@some.place.com.au>, relay=local, delay=1, status=bounced (possible alias database loop for vin)
May 10 19:55:40 onion postfix/local[8572]: warning: possible alias database loop for phillis
May 10 19:55:40 onion postfix/local[8572]: 6A222C0329: to=<phi...@some.place.com.au>, relay=local, delay=1, status=bounced (possible alias database loop for phillis)
May 10 19:55:40 onion postfix/local[8572]: warning: possible alias database loop for chris
Some users get the mail correctly, but others get the following email.
Some other users get a portion of the email. The amount of mail (ie
the number of failures notices sent) seems to depend on the position
of the user in the expansion.
From MAILER-DAEMON Thu May 10 20:01:29 2001
Return-Path: <>
Delivered-To: v...@some.place.com.au
Received: by mailbox.some.place.com.au (Postfix) via BOUNCE
id 5CBE3C0329; Thu, 10 May 2001 20:01:29 +1000 (EST)
Date: Thu, 10 May 2001 20:01:29 +1000 (EST)
From: MAILER...@some.place.com.au (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: f...@some.place.com.au
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="A62CAC0319.989488889/mailbox.some.place.com.au"
Message-Id: <200105101001...@mailbox.some.place.com.au>
This is a MIME-encapsulated message.
--A62CAC0319.989488889/mailbox.some.place.com.au
Content-Description: Notification
Content-Type: text/plain
This is the Postfix program at host mailbox.some.place.com.au.
I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the message returned below.
The Postfix program
<te...@some.place.com.au>: possible alias database loop for tech
<ad...@some.place.com.au>: possible alias database loop for adm
<garl...@some.place.com.au>: possible alias database loop for garglers
<v...@some.place.com.au>: possible alias database loop for vin
<b...@some.place.com.au>: possible alias database loop for bob
<phy...@some.place.com.au>: possible alias database loop for phyllis
<ch...@some.place.com.au>: possible alias database loop for chris
Final-Recipient: rfc822; ro...@some.place.com.au
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; possible alias database loop for roger
Final-Recipient: rfc822; f...@some.place.com.au
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; possible alias database loop for fxl
This is the output from postconf -d
2bounce_notice_recipient = postmaster
access_map_reject_code = 554
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, nis:mail.aliases
allow_mail_to_commands = alias,forward
allow_mail_to_files = alias,forward
allow_min_user = no
allow_percent_hack = yes
allow_untrusted_routing = no
always_bcc =
append_at_myorigin = yes
append_dot_mydomain = yes
best_mx_transport =
biff = yes
body_checks =
bounce_notice_recipient = postmaster
bounce_size_limit = 50000
broken_sasl_auth_clients = no
canonical_maps =
command_directory = $program_directory
command_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEF
GHIJKLMNOPQRSTUVWXYZ
command_time_limit = 1000s
content_filter =
daemon_directory = $program_directory
daemon_timeout = 18000s
debug_peer_level = 2
debug_peer_list =
default_database_type = hash
default_destination_concurrency_limit = 10
default_destination_recipient_limit = 50
default_privs = nobody
default_process_limit = 50
default_transport = smtp
defer_transports =
delay_notice_recipient = postmaster
delay_warning_time = 0h
deliver_lock_attempts = 20
deliver_lock_delay = 1s
disable_dns_lookups = no
disable_vrfy_command = no
dont_remove = 0
double_bounce_sender = double-bounce
duplicate_filter_limit = 1000
empty_address_recipient = MAILER-DAEMON
error_notice_recipient = postmaster
expand_owner_alias = no
export_environment = TZ
extract_recipient_limit = 10240
fallback_relay =
fallback_transport =
fast_flush_domains = $relay_domains
fast_flush_purge_time = 7d
fast_flush_refresh_time = 12h
fork_attempts = 5
fork_delay = 1s
forward_expansion_filter = 1234567890!@%-_=+:,./abcdefghijklmnopqrstuvwxyzABCDEF
GHIJKLMNOPQRSTUVWXYZ
forward_path = $home/.forward${recipient_delimiter}${extension},$home/.forward
hash_queue_depth = 2
hash_queue_names = incoming,active,deferred,bounce,defer,flush
header_checks =
header_size_limit = 102400
home_mailbox =
hopcount_limit = 50
ignore_mx_lookup_error = no
import_environment = MAIL_CONFIG MAIL_DEBUG TZ XAUTHORITY DISPLAY
inet_interfaces = all
initial_destination_concurrency = 5
invalid_hostname_reject_code = 501
ipc_idle = 100s
ipc_timeout = 3600s
line_length_limit = 2048
lmtp_cache_connection = yes
lmtp_connect_timeout = 0s
lmtp_data_done_timeout = 600s
lmtp_data_init_timeout = 120s
lmtp_data_xfer_timeout = 180s
lmtp_lhlo_timeout = 300s
lmtp_mail_timeout = 300s
lmtp_quit_timeout = 300s
lmtp_rcpt_timeout = 300s
lmtp_rset_timeout = 300s
lmtp_sasl_auth_enable = no
lmtp_sasl_password_maps =
lmtp_sasl_security_options = noplaintext, noanonymous
lmtp_skip_quit_response = no
lmtp_tcp_port = 24
local_command_shell =
local_destination_concurrency_limit = 2
local_destination_recipient_limit = 1
local_recipient_maps =
local_transport = local
luser_relay =
mail_name = Postfix
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mail_version = Release-20010228
mailbox_command =
mailbox_delivery_lock = flock, dotlock
mailbox_size_limit = 51200000
mailbox_transport =
maps_rbl_domains = blackholes.mail-abuse.org
maps_rbl_reject_code = 554
masquerade_domains =
masquerade_exceptions =
max_idle = 100s
max_use = 100
maximal_backoff_time = 4000s
maximal_queue_lifetime = 5d
message_size_limit = 10240000
minimal_backoff_time = 1000s
mydestination = $myhostname, localhost.$mydomain
mydomain = onion
myhostname = onion
mynetworks = 127.0.0.0/8 192.168.1.0/24
mynetworks_style = subnet
myorigin = $myhostname
non_fqdn_reject_code = 504
notify_classes = resource,software
owner_request_special = yes
prepend_delivered_header = command, file, forward
process_id_directory = pid
program_directory = /usr/libexec/postfix
propagate_unmatched_extensions = canonical, virtual
qmgr_fudge_factor = 100
qmgr_message_active_limit = 10000
qmgr_message_recipient_limit = 10000
qmgr_site_hog_factor = 100
queue_directory = /var/spool/postfix
queue_minfree = 0
queue_run_delay = 1000s
recipient_canonical_maps =
recipient_delimiter =
reject_code = 554
relay_domains = $mydestination
relay_domains_reject_code = 554
relayhost =
relocated_maps =
require_home_directory = no
sender_canonical_maps =
service_throttle_time = 60s
smtp_always_send_ehlo = no
smtp_bind_address =
smtp_connect_timeout = 0s
smtp_data_done_timeout = 600s
smtp_data_init_timeout = 120s
smtp_data_xfer_timeout = 180s
smtp_destination_concurrency_limit = $default_destination_concurrency_limit
smtp_destination_recipient_limit = $default_destination_recipient_limit
smtp_helo_timeout = 300s
smtp_mail_timeout = 300s
smtp_never_send_ehlo = no
smtp_quit_timeout = 300s
smtp_rcpt_timeout = 300s
smtp_sasl_auth_enable = no
smtp_sasl_password_maps =
smtp_sasl_security_options = noplaintext, noanonymous
smtp_skip_4xx_greeting = yes
smtp_skip_5xx_greeting = yes
smtp_skip_quit_response = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_restrictions =
smtpd_delay_reject = yes
smtpd_error_sleep_time = 5s
smtpd_etrn_restrictions =
smtpd_hard_error_limit = 100
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_junk_command_limit = 1000
smtpd_recipient_limit = 1000
smtpd_recipient_restrictions = permit_mynetworks,check_relay_domains
smtpd_restriction_classes =
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions =
smtpd_soft_error_limit = 10
smtpd_timeout = 300s
soft_bounce = no
stale_lock_time = 500s
strict_rfc821_envelopes = no
sun_mailtool_compatibility = no
swap_bangpath = yes
syslog_facility = mail
transport_maps =
transport_retry_time = 60s
trigger_timeout = 10s
undisclosed_recipients_header = To: undisclosed-recipients:;
unknown_address_reject_code = 450
unknown_client_reject_code = 450
unknown_hostname_reject_code = 450
virtual_maps =
This system is still in eval, so I can restructure the aliases anyway I need to.
The two things I need to achieve with my aliases are:
1) I need to be able to copy mail from one user to many others
2) I would like to manage the copy list using lists and sometimes realnames
help!
Francis
--
Francis Liu 02 9900 2108 Direct
EnStor - Enterprise Storage Solutions 0414 60 90 77 Mobile
http://www.enstor.com.au 02 9900 2100 Switch
02 9900 2199 Fax
-
To unsubscribe, send mail to majo...@postfix.org with content
(not subject): unsubscribe postfix-users
... snip ...
> I've got a complicated aliases file that works under sendmail but doesn't
> produce the right results under postfix.
So whenever someone says: "it works with Sendmail, so it must be Postfix
bug" my initial reaction is "yeah, right".
... snip ...
From an old posting here on the list:
> "possible alias database loop" means that an alias expands into
> something that invokes that same alias again.
>
> Wietse
That is, because of Postfix modular design, Postfix cannot automagically
eliminate expansions like sendmail can.
Fix your aliases table.
--
ralf.hil...@innominate.com innominate AG
System Engineer Don't be afraid of what you see -
Diplom-Informatiker be afraid of what you don't see!
tel: +49.(0)7000.POSTFIX fax: +49.(0)30.308806-698
> On Thu, May 10, 2001 at 09:28:56PM +1000, Francis Liu wrote:
>
> > > > "possible alias database loop" means that an alias expands into
> > > > something that invokes that same alias again.
> >
> > Yes. The lists should terminate after n iterations, because there
> > are \user style tokens in places so that is can terminate.
>
> Postfix has no "\user" style tokens. See "man aliases"
>
I've read it, and I've also read the post that says:
In order to deliver mail to a user AND to an alias of that user,
specify that user in the expansion of that user's alias, thusly:
flump: flump, other...
That works with Postfix AND with Sendmail.
The \user form is no longer supported by Postfix. Fixing that
requires butchering of the tok822_parse module, which is code
that I prefer to leave alone.
Wietse
I had previously tried removed the \'s, but now I've also put the
username in the front of the alias, and it's still not working.
If I do a visual walkthrough of my aliases, everything does reach
a terminal. Is there somewhere I can adjust the number of alias
expansions before postfix gives up and says that I have a loop?
So, if I have an alias (that after expansion) looks like:
bill: bill, bob, roger, bill, peter, chris, bill
I'd expect that bill would get four copies. Does it try to
expand bill everytime it sees it?
--
Francis Liu 02 9900 2108 Direct
EnStor - Enterprise Storage Solutions 0414 60 90 77 Mobile
http://www.enstor.com.au 02 9900 2100 Switch
02 9900 2199 Fax
-
> If I do a visual walkthrough of my aliases, everything does reach
> a terminal. Is there somewhere I can adjust the number of alias
> expansions before postfix gives up and says that I have a loop?
>
> So, if I have an alias (that after expansion) looks like:
>
> bill: bill, bob, roger, bill, peter, chris, bill
>
> I'd expect that bill would get four copies. Does it try to
> expand bill everytime it sees it?
I guess you're shooting yourself into the foot with something like:
a: b
b: a
Something like a topological sorting of your alias file might come in handy.
Done that during my university time...
--
ralf.hil...@innominate.com innominate AG
System Engineer Don't be afraid of what you see -
Diplom-Informatiker be afraid of what you don't see!
tel: +49.(0)7000.POSTFIX fax: +49.(0)30.308806-698