You are not logged in.
After updates and move to systemd, I can no longer send mails via my mailserver. I get a relay access denied in mail.log and in auth.log the following
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin Parse the username peter@mydomain.dk
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin try and connect to a host
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin trying to open db '' on host ''
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin could not connect to host
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin couldn't connect to any host
Mar 4 12:32:31 localhost saslauthd[2743]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin Parse the username peter@mydomain.dk
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin try and connect to a host
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin trying to open db '' on host ''
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin could not connect to host
Mar 4 12:32:31 localhost postfix/smtpd[2726]: sql plugin couldn't connect to any host
testsaslauthd works
testsaslauthd -u 'peter@mydomain.dk' -p 'pass' -s smtp
0: OK "Success."
My/etc/pam.d/smtp looks like this
auth required /usr/lib/security/pam_mysql.so user=postfix passwd=YOUR_NEW_PASSWD host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1
account sufficient /usr/lib/security/pam_mysql.so user=postfix passwd=YOUR_NEW_PASSWD host=localhost db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=1
postconf -n gives the following
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
cyrus_sasl_config_path = /usr/lib/sasl2
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5
home_mailbox = Maildir/
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/man
mydestination = localhost
mydomain = openconsulting.dk
myhostname = openconsulting.dk
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = $mydestination
relayhost = vip.cybercity.dk
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = permit_sasl_authenticated, reject_unauth_destination permit, reject_rbl_client zen.spamhaus.org
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject, reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination, reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dialup.blacklist.jippg.org, reject_rbl_client cbl.abuseat.org, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, check_sender_access hash:/etc/postfix/sender_access check_policy_service inet:127.0.0.1:10030 permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_rhsbl_sender dsn.rfc-ignorant.org reject_non_fqdn_sender, reject_unknown_sender_domain, permit
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual_aliases, mysql:/etc/postfix/mysql_virtual_forwards.cf
virtual_gid_maps = static:5003
virtual_mailbox_base = /home/vmailer
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailboxes.cf
virtual_minimum_uid = 5003
virtual_uid_maps = static:5003
My /usr/lib/sasl2/smpt.conf looks like this
pwcheck_method: saslauthd
mech_list: auth plain login
saslauthd_path: /var/run/saslauthd/mux
auxprop_plugin: sql
log_level: 7
sql_select: dummy
I seems to be an issue with pam_mysql. At least that's what I'm getting at. saslauthd will run, but gives an error
systemctl status saslauthd
saslauthd.service - Cyrus SASL authentication daemon
Loaded: loaded (/usr/lib/systemd/system/saslauthd.service; disabled)
Active: active (running) since man 2013-03-04 12:32:16 CET; 21min ago
Process: 2742 ExecStart=/usr/sbin/saslauthd $SASLAUTHD_OPTS (code=exited, status=0/SUCCESS)
Main PID: 2743 (saslauthd)
CGroup: name=systemd:/system/saslauthd.service
├─2743 /usr/sbin/saslauthd -m /var/run/saslauthd -r -a pam
├─2744 /usr/sbin/saslauthd -m /var/run/saslauthd -r -a pam
├─2745 /usr/sbin/saslauthd -m /var/run/saslauthd -r -a pam
├─2746 /usr/sbin/saslauthd -m /var/run/saslauthd -r -a pam
└─2747 /usr/sbin/saslauthd -m /var/run/saslauthd -r -a pammar 04 12:32:16 localhost systemd[1]: Starting Cyrus SASL authentication daemon...
mar 04 12:32:16 localhost systemd[1]: Started Cyrus SASL authentication daemon.
mar 04 12:32:16 localhost saslauthd[2743]: detach_tty : master pid is: 2743
mar 04 12:32:16 localhost saslauthd[2743]: ipc_init : listening on socket: /var/run/saslauthd/mux
mar 04 12:32:31 localhost saslauthd[2743]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
mar 04 12:35:19 localhost saslauthd[2744]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
mar 04 12:46:49 localhost saslauthd[2745]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
mar 04 12:47:39 localhost saslauthd[2746]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
mar 04 12:48:45 localhost saslauthd[2747]: pam_mysql - something went wrong when invoking crypt() - No such file or directory
I've been starring myself blind at this, and I hope that someone can shed a little light on the issue
Thanks in advance
Offline
can my issue be, that recent version of cyrus-sasl doesn't have crypt support?
EDIT: Well, cyrus-sasl can't use crypt, which is why it's setup to use PAM :S. So I guess that's unrelated
Last edited by Del Pede (2013-03-04 22:08:00)
Offline