Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix won't send portage logmails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
msulli1355
Apprentice
Apprentice


Joined: 24 Nov 2005
Posts: 179
Location: OKlahoma, USA

PostPosted: Thu Sep 03, 2015 8:43 pm    Post subject: Postfix won't send portage logmails Reply with quote

I followed the guide at http://en.gentoo-wiki.com/wiki/Mail_server_using_Postfix_and_Dovecot to set up postfix. Posfix WILL send emails from cron, but not portage. I installed app-accessibility/festival-2.1-r1::gentoo today. At the bottom of my teminal window, it says:

>>> Installing (1 of 1) app-accessibility/festival-2.1-r1::gentoo
*
* Useful examples include saytime, text2wave. For example, try:
* "/usr/share/doc/festival-2.1-r1/examples/saytime"
*
* Or for something more fun:
* "echo "Gentoo can speak" | festival --tts"
*
* This version also allows configuration of site specific
* initialization in /etc/festival/siteinit.scm and
* variables in /etc/festival/sitevars.scm.
*
!!! An error occurred while trying to send logmail:
Connection unexpectedly closed
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

* GNU info directory index is up-to-date.

* IMPORTANT: config file '/etc/postfix/main.cf' needs updating.
* See the CONFIGURATION FILES section of the emerge
* man page to learn how to update config files.


When I consult /var/log/messages, I see this:
Sep 3 15:28:24 camille postfix/smtpd[14770]: connect from camille.espersunited.com[192.168.0.3]
Sep 3 15:28:24 camille postfix/smtpd[14770]: fatal: no SASL authentication mechanisms
Sep 3 15:28:25 camille postfix/master[6903]: warning: process /usr/libexec/postfix/smtpd pid 14770 exit status 1
Sep 3 15:28:25 camille postfix/master[6903]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

What gives? I manually started saslauthd because somebody said that resolved their issue:

michael@camille ~ $ sudo ps ax | grep saslauthd
Password:
10839 ? Ss 0:00 saslauthd -a sasldb start
10840 ? S 0:00 saslauthd -a sasldb start
10841 ? S 0:00 saslauthd -a sasldb start
10842 ? S 0:00 saslauthd -a sasldb start
10843 ? S 0:00 saslauthd -a sasldb start
14832 pts/0 S+ 0:00 grep --colour=auto saslauthd

I'm kinda lost here. Please help!
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 402
Location: Somewhere in Denmark

PostPosted: Fri Sep 04, 2015 8:57 pm    Post subject: Reply with quote

I've got a working (for me:)) Dovecot/Postfix-setup - I'm using Dovecot for handling sasl (you've got Dovecot running?), though (ie. 'smtpd_sasl_type = dovecot' in /etc/postfix/main.cf), I don't have saslauthd running.
(No idea if Dovecot calls it at some point)

Other than that it seems odd that Cron can send mails but not Portage (how's your restrictions in /etc/postfix/main.cf?)

ie. I've got something like:
Code:
smtpd_client_restrictions =
        sleep 10
        check_client_access mysql:/etc/postfix/mysql-sa-policy.cf
        check_client_access hash:/etc/postfix/maps/access_client
        warn_if_reject reject_unknown_reverse_client_hostname
smtpd_helo_restrictions =
        warn_if_reject reject_invalid_helo_hostname
        reject_non_fqdn_helo_hostname
smtpd_sender_restrictions =
        warn_if_reject reject_unknown_sender_domain
        reject_non_fqdn_sender
smtpd_relay_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        reject_unauth_destination
smtpd_recipient_restrictions =
        permit_mynetworks
        permit_sasl_authenticated
        reject_unknown_recipient_domain
        reject_non_fqdn_recipient
.....


Might also check mynetworks/mynetworks_style in /etc/postfix/main.cf

Also seems like you might want to update your main.cf using etc-update or similar?
Code:
* IMPORTANT: config file '/etc/postfix/main.cf' needs updating.
* See the CONFIGURATION FILES section of the emerge
* man page to learn how to update config files.
Back to top
View user's profile Send private message
msulli1355
Apprentice
Apprentice


Joined: 24 Nov 2005
Posts: 179
Location: OKlahoma, USA

PostPosted: Sat Sep 05, 2015 3:38 pm    Post subject: Reply with quote

I took care of the etc-update thing. I also openened up /etc/postfix/main.cf and added the line:

mynetworks = 192.168.0.0/28, 127.0.0.0/8

I restarted postfix, and then tried to re-merge festival. At this point it's the only package that I know of that definitely tries to send logmail. I got the familiar

!!! An error occurred while trying to send logmail:
Connection unexpectedly closed

My /var/log/messages says:

Sep 5 10:35:11 camille postfix/smtpd[31523]: connect from camille.espersunited.com[192.168.0.3]
Sep 5 10:35:11 camille postfix/smtpd[31523]: fatal: no SASL authentication mechanisms
Sep 5 10:35:12 camille postfix/master[27613]: warning: process /usr/libexec/postfix/smtpd pid 31523 exit status 1
Sep 5 10:35:12 camille postfix/master[27613]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling


What's next?
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Thu Sep 17, 2015 8:10 am    Post subject: Reply with quote

I can't view the howto.

Can you do a postconf -n | grep sasl and paste it.
Back to top
View user's profile Send private message
msulli1355
Apprentice
Apprentice


Joined: 24 Nov 2005
Posts: 179
Location: OKlahoma, USA

PostPosted: Thu Sep 17, 2015 7:59 pm    Post subject: Reply with quote

michael@camille ~ $ sudo postconf -n | grep sasl
Password:
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Sep 18, 2015 9:09 am    Post subject: Reply with quote

That's ok. Can you confirm that Postfix is build with dovecot-sasl support too?
Back to top
View user's profile Send private message
msulli1355
Apprentice
Apprentice


Joined: 24 Nov 2005
Posts: 179
Location: OKlahoma, USA

PostPosted: Fri Sep 18, 2015 2:54 pm    Post subject: Reply with quote

Calculating dependencies... done!
[ebuild R ] mail-mta/postfix-3.0.1-r1::gentoo USE="berkdb dovecot-sasl eai ldap mysql pam sasl ssl -cdb -doc -hardened -ldap-bind -lmdb -mbox -memcached -nis -postgres (-selinux) -sqlite -vda" 0 KiB
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 402
Location: Somewhere in Denmark

PostPosted: Fri Sep 18, 2015 3:39 pm    Post subject: Reply with quote

I was able to get the same result:
Code:
Sep 18 17:31:32 [postfix/smtpd] connect from ns.vlh.dk[127.0.0.1]
Sep 18 17:31:32 [postfix/smtpd] warning: SASL: Connect to private/auth failed: Connection refused
Sep 18 17:31:32 [postfix/smtpd] fatal: no SASL authentication mechanisms
Sep 18 17:31:32 [postfix/master] warning: process /usr/libexec/postfix/smtpd pid 16832 exit status 1
Sep 18 17:31:32 [postfix/master] warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

after shutting down Dovecot - has Dovecot been started (rc-status | grep dovecot)? - is it running (ps aux | grep dovecot)?
Back to top
View user's profile Send private message
msulli1355
Apprentice
Apprentice


Joined: 24 Nov 2005
Posts: 179
Location: OKlahoma, USA

PostPosted: Sat Sep 19, 2015 3:12 pm    Post subject: Reply with quote

michael@camille ~ $ sudo rc-status | grep dovecot
dovecot [ started ]
michael@camille ~ $ sudo ps aux | grep dovecot
root 3176 0.0 0.0 3392 2232 ? Ss Sep14 0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf
dovecot 3404 0.0 0.0 3092 1704 ? S Sep14 0:00 dovecot/anvil
root 3405 0.0 0.0 3224 1948 ? S Sep14 0:00 dovecot/log
michael 19419 0.0 0.0 4636 2156 pts/4 S+ 10:12 0:00 grep --colour=auto dovecot
michael@camille ~ $
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum