Setup:
Running as "user1" I sent an email to "testuser" (local) and I expected
it to end up in the "root" mbox since that was what I configured in
aliases.
(note: I know that you shouldn't receive email as root, this is just a
test setup for trying out the new smtpd)
/etc/mail/smtpd.conf
---
listen on lo0
map "aliases" { source db "/etc/mail/aliases.db" }
accept from "127.0.0.1" for local deliver to mbox
---
/etc/mail/aliases (I've run newaliases after editing)
---
#
# $OpenBSD: aliases,v 1.30 2009/05/20 21:10:06 thib Exp $
#
# Aliases in this file will NOT be expanded in the header from
# Mail, but WILL be visible over networks or from /usr/libexec/mail.local.
#
# >>>>>>>>>> The program "newaliases" must be run after
# >> NOTE >> this file is updated for any changes to
# >>>>>>>>>> show through to sendmail.
#
# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root
# General redirections for important pseudo accounts
daemon: root
ftp-bugs: root
operator: root
uucp: root
www: root
# Redirections for pseudo accounts that should not receive mail
_afs: /dev/null
_bgpd: /dev/null
_btd: /dev/null
_dhcp: /dev/null
_dvmrpd: /dev/null
_fingerd: /dev/null
_ftp: /dev/null
_hostapd: /dev/null
_identd: /dev/null
_isakmpd: /dev/null
_kadmin: /dev/null
_kdc: /dev/null
_mopd: /dev/null
_ntp: /dev/null
_ospfd: /dev/null
_ospf6d: /dev/null
_pflogd: /dev/null
_portmap: /dev/null
_ppp: /dev/null
_rbootd: /dev/null
_relayd: /dev/null
_ripd: /dev/null
_rstatd: /dev/null
_rtadvd: /dev/null
_rusersd: /dev/null
_rwalld: /dev/null
_smtpd: /dev/null
_snmpd: /dev/null
_spamd: /dev/null
_syslogd: /dev/null
_tcpdump: /dev/null
_tftpd: /dev/null
_x11: /dev/null
_ypldap: /dev/null
bin: /dev/null
named: /dev/null
nobody: /dev/null
popa3d: /dev/null
proxy: /dev/null
smmsp: /dev/null
sshd: /dev/null
# Well-known aliases -- these should be filled in!
# root:
# manager:
# dumper:
# RFC 2142: NETWORK OPERATIONS MAILBOX NAMES
abuse: root
# noc: root
security: root
# RFC 2142: SUPPORT MAILBOX NAMES FOR SPECIFIC INTERNET SERVICES
# hostmaster: root
# usenet: root
# news: usenet
# webmaster: root
# ftp: root
# uncomment this for msgs:
# msgs: "|/usr/bin/msgs -s"
testuser: root
---
command run on local machine
---
mail -s test2 testuser
test2
.
---
smtpd -bv
---
warning: could not load cert: lo0, no SSL/TLS/AUTH support
startup [debug mode]
smtpd: max open files 1024
smtpd: will accept at most 768 clients
parent_send_config: configuring smtp
parent_send_config_client_certs: configuring smtp
parent_send_config_ruleset: reloading rules and maps
parent_send_config_ruleset: reloading rules and maps
smtp_setup_events: listen on IPv6:fe80:3::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on IPv6:::1 port 25 flags 0x0 cert "lo0"
smtp_setup_events: listen on 127.0.0.1 port 25 flags 0x0 cert "lo0"
smtp_accept: incoming client on listener: 0x2051b6000
smtp_accept: accepted client on listener: 0x2051b6000
lookup_ptr 127.0.0.1
lookup_ptr success
session_pickup: greeting client
command: EHLO args: pcc.abc.test
command: MAIL From args: <us...@pcc.abc.test>
session_rfc5321_mail_handler: sending notification to mfa
matching: pcc.abc.test to localhost
matching: pcc.abc.test to pcc.abc.test
matching: pcc.abc.test to localhost
matching: pcc.abc.test to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
queue_dispatch_smtp: creating message file
smtp_dispatch_queue: queue handled message creation
command: RCPT To args: <testu...@pcc.abc.test>
matching: pcc.abc.test to localhost
matching: pcc.abc.test to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
command: DATA args: (null)
command: RSET args: (null)
command: RSET args: (null)
command: MAIL From args: <>
session_rfc5321_mail_handler: sending notification to mfa
matching: to localhost
matching: to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
queue_dispatch_smtp: creating message file
smtp_dispatch_queue: queue handled message creation
command: RCPT To args: <us...@pcc.abc.test>
matching: pcc.abc.test to localhost
matching: pcc.abc.test to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
command: DATA args: (null)
command: RSET args: (null)
command: RSET args: (null)
command: MAIL From args: <>
session_rfc5321_mail_handler: sending notification to mfa
matching: to localhost
matching: to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
queue_dispatch_smtp: creating message file
smtp_dispatch_queue: queue handled message creation
command: RCPT To args: <postmas...@pcc.abc.test>
matching: pcc.abc.test to localhost
matching: pcc.abc.test to pcc.abc.test
smtp_dispatch_mfa: mfa handled return path
^Crunner handler
queue handler
smtp server exiting
mail transfer agent exiting
mail delivery agent exiting
lookup agent exiting
mail filter exiting
control process exiting
parent terminating
---
content of /var/spool/mqueue/....
---
This is a MIME-encapsulated message
--n9QM0pDG021630.1256594469/pcc.abc.test
The original message was received at Mon, 26 Oct 2009 23:00:52 +0100 (CET)
from localhost
----- The following addresses had permanent fatal errors -----
user1
(reason: 530 Recipient rejected)
(expanded from: user1)
----- Transcript of session follows -----
... while talking to [127.0.0.1]:
RCPT To:<us...@pcc.abc.test>
<<< 530 Recipient rejected
554 5.0.0 Service unavailable
DATA
<<< 503 Need RCPT before DATA
--n9QM0pDG021630.1256594469/pcc.abc.test
Content-Type: message/delivery-status
Reporting-MTA: dns; pcc.abc.test
Arrival-Date: Mon, 26 Oct 2009 23:00:52 +0100 (CET)
Final-Recipient: RFC822; us...@pcc.abc.test
Action: failed
Status: 5.0.0
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 530 Recipient rejected
Last-Attempt-Date: Mon, 26 Oct 2009 23:00:59 +0100 (CET)
--n9QM0pDG021630.1256594469/pcc.abc.test
Content-Type: message/rfc822
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
by pcc.abc.test (8.14.3/8.14.3/Submit) id n9QM0pDF021630;
Mon, 26 Oct 2009 23:00:52 +0100 (CET)
Date: Mon, 26 Oct 2009 23:00:52 +0100 (CET)
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <200910262200.n9qm0pdf021...@pcc.abc.test>
To: user1
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="n9QM0pDF021630.1256594452/pcc.abc.test"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--n9QM0pDF021630.1256594452/pcc.abc.test
The original message was received at Mon, 26 Oct 2009 23:00:51 +0100 (CET)
from r...@localhost
----- The following addresses had permanent fatal errors -----
testuser
(reason: 530 Recipient rejected)
(expanded from: testuser)
----- Transcript of session follows -----
... while talking to [127.0.0.1]:
RCPT To:<testu...@pcc.abc.test>
<<< 530 Recipient rejected
554 5.0.0 Service unavailable
DATA
<<< 503 Need RCPT before DATA
--n9QM0pDF021630.1256594452/pcc.abc.test
Content-Type: message/delivery-status
Reporting-MTA: dns; pcc.abc.test
Arrival-Date: Mon, 26 Oct 2009 23:00:51 +0100 (CET)
Final-Recipient: RFC822; testu...@pcc.abc.test
Action: failed
Status: 5.0.0
Remote-MTA: DNS; [127.0.0.1]
Diagnostic-Code: SMTP; 530 Recipient rejected
Last-Attempt-Date: Mon, 26 Oct 2009 23:00:51 +0100 (CET)
--n9QM0pDF021630.1256594452/pcc.abc.test
Content-Type: message/rfc822
Return-Path: <user1>
Received: (from r...@localhost)
by pcc.abc.test (8.14.3/8.14.3/Submit) id n9QM0pDE021630
for testuser; Mon, 26 Oct 2009 23:00:51 +0100 (CET)
Date: Mon, 26 Oct 2009 23:00:51 +0100 (CET)
From: user1
Message-Id: <200910262200.n9qm0pde021...@pcc.abc.test>
To: testuser
Subject: test2
test2
--n9QM0pDF021630.1256594452/pcc.abc.test--
--n9QM0pDG021630.1256594469/pcc.abc.test--
Gilles Chehade wrote:
On Mon, Oct 26, 2009 at 10:17:30PM +0100, Robert wrote:
I don't have an answer to this, but I would like to add that I have the
same problem with aliases (no vmap in use):
If i have an entry like "aliasuser: realuser" in the aliases file, then
any email to "aliasuser" will be rejected with "530"; only real users
are accepted as recipients.
It seems to me that SMTPD is not resolving the usernames.
regards,
Robert
can you please show us your smtpd.conf, /etc/mail/aliases file and
the output of smtpd -dv while you reproduce the issue ?
Gilles