OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: aliases being ignored, Mac OS X 10.3.9

From: Matt Morgan (minxmertzmomogmail.com)
Date: Wed Jan 11 2006 - 08:34:40 CST


On 1/10/06, Matt Morgan <minxmertzmomogmail.com> wrote:
> On 1/10/06, Magnus Bäck <magnusdsek.lth.se> wrote:
> > On Tuesday, January 10, 2006 at 22:33 CET,
> > Matt Morgan <minxmertzmomogmail.com> wrote:
> >
> > > I'm trying to set up mailman on an OS X server that I don't have a lot
> > > of control over. It appears to have the default installation of
> > > postfix that comes with OS X 10.3.9. I'm not a postfix expert by any
> > > means, but I think I've done everything typical yet I cannot get
> > > postfix to notice and act upon aliases in /etc/aliases.
> > >
> > > For example, if I run
> > >
> > > mail -s"test" minxmertzmomogmail.com < sometextfile
> > >
> > > I get the file in my inbox. But when I edited /etc/aliases as below:
> > >
> > > matt: minxmertzmomogmail.com
> > >
> > > then ran newaliases (and reloaded postfix for good measure), the command
> > >
> > > mail -s"test" matt < sometextfile
> > >
> > > does not work. Instead, the alias is ignored and the message sits in
> > > the 'defer' area of the queue:
> > >
> > > cca:/private/var/spool/postfix/defer/2 root# cat 20DD57E741
> > > <mattcca.thisdomain.org>: connect to
> > > cca.thisdomain.org[192.168.1.56]: Connection refused
> >
> > Why does Postfix connect to that host? What is the name of your host?
> > What is the output from "postconf -n"?
> >
> > Either you haven't listed the domain in question in mydestination,
> > or your transport table messes things up.
> >
> > [...]
> >
>
> That host is the localhost. It looks to me like postfix is attempting
> local delivery, despite the alias. But I could be wrong about that.
>
> Here's the output from postconf -n:
>
> cca:/usr/share/mailman/Mailman root# postconf -n
> always_bcc =
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> debug_peer_level = 2
> enable_server_options = yes
> inet_interfaces = all
> luser_relay = cborkowskiguggenheim.org
> mail_owner = postfix
> mailbox_transport = cyrus
> mailq_path = /usr/bin/mailq
> manpage_directory = /usr/share/man
> maps_rbl_domains =
> message_size_limit = 10240000
> mydestination = $myhostname,localhost.$mydomain
> mydomain = steve.museum
> mydomain_fallback = localhost
> myhostname = cca
> mynetworks = 127.0.0.1/32
> mynetworks_style = host
> myorigin = $mydomain
> newaliases_path = /usr/bin/newaliases
> queue_directory = /private/var/spool/postfix
> readme_directory = /usr/share/doc/postfix
> relayhost =
> sample_directory = /usr/share/doc/postfix/examples
> sendmail_path = /usr/sbin/sendmail
> setgid_group = postdrop
> smtpd_client_restrictions =
> smtpd_enforce_tls = no
> smtpd_pw_server_security_options = gssapi
> smtpd_recipient_restrictions =
> permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,permit
> smtpd_sasl_auth_enable = yes
> smtpd_tls_cert_file = /etc/postfix/server.pem
> smtpd_tls_loglevel = 0
> smtpd_use_pw_server = yes
> smtpd_use_tls = yes
> unknown_local_recipient_reject_code = 450
>
> Thanks,
> Matt
>

I think I may have figured this out but I'd like some advice before I
continue. Here's the current situation:

1) Mac OS X 10.3.9, with the postfix that comes preinstalled.
2) I am able to send mail to outside addresses. If I run

mail -s"whatever" minxmertzmomogmail.com < /etc/postfix/main.cf

I get the message normally.
3) But if I try to create an alias in /etc/alias, as in

matt: minxmertzmomogmail.com

then run newaliases and reload postfix, and then send to that alias:

mail -s"whatever" matt < /etc/postfix/main.cf

the message never arrives.

Here's what I noticed. In my /var/log/mail.log, I see

Jan 11 09:12:09 cca postfix/pickup[5259]: 845597F031: uid=1031 from=<matt_m>
Jan 11 09:12:09 cca postfix/cleanup[5260]: 845597F031:
message-id=<20060111141209.845597F031cca>
Jan 11 09:12:09 cca postfix/qmgr[5262]: 845597F031:
from=<matt_msteve.museum>, size=27302, nrcpt=1 (queue active)
Jan 11 09:12:09 cca postfix/smtp[5267]: 845597F031:
to=<mattsteve.museum>, orig_to=<matt>, relay=none, delay=0,
status=bounced (Name service error for name=steve.museum type=A: Host
found but no data record of requested type)

Key: the hostname is 'cca.' I'm logged in as "matt_m." It's the "to"
line that's interesting--postfix is trying to deliver the message to
'mattsteve.museum', even though 'matt' is aliased to
'minxmertzmomogmail.com.'

I guess the error message means that there is no MX record for
steve.museum. I didn't set up DNS, so that could easily be true. Is
that right; and could that also be why the alias never gets
interpreted? That is, does postfix try to deliver locally first,
before checking the alias?

Thanks,
Matt