View previous topic :: View next topic |
Author |
Message |
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Mon Feb 11, 2013 8:49 pm Post subject: Sendmail and SQL issues |
|
|
SMS64 2.0.2
Sendmail Mail Server:
I had sendmail working last week. I haven't changed anything but am now having a hard time getting it to start.
Command: /etc/rc.d/rc.sendmail start returns the following error:
"postfix: fatal: the postfix command must not run as a set-uid process"
On another note:
Following a system reboot, I also have to stop and restart the MY SQL server to get it to work properly.
I would appreciate any ideas on how I might address these issues.
Thanks!!! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Feb 11, 2013 9:24 pm Post subject: |
|
|
First to clear any doubts run
Code: | smsconfig sendmail st
smsconfig postfix st |
You must not run both MTA at the same time.
Although I don't see any reason why, if you want to switch to sendmail MTA use sms-chooseMTA.sh
By default sendmail is disabled.
Do not confuse sendmail binary with sendmail MTA.
As for mysql, what Code: | tail -100 /var/lib/mysql/$(hostname).err | says?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Mon Feb 11, 2013 9:43 pm Post subject: My SQL |
|
|
> tail -100 /var/lib/mysql/pluto.err
130204 14:35:03 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/var/run/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
130211 10:56:09 [Note] /usr/libexec/mysqld: Normal shutdown
130211 10:56:09 [Note] Event Scheduler: Purging the queue. 0 events
130211 10:56:10 InnoDB: Starting shutdown...
130211 10:56:11 InnoDB: Shutdown completed; log sequence number 3169303
130211 10:56:11 [Note] /usr/libexec/mysqld: Shutdown complete
130211 10:56:11 mysqld_safe mysqld from pid file /var/lib/mysql/pluto.pid ended
130211 10:57:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130211 10:57:08 [Note] Plugin 'FEDERATED' is disabled.
130211 10:57:08 InnoDB: The InnoDB memory heap is disabled
130211 10:57:08 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130211 10:57:08 InnoDB: Compressed tables use zlib 1.2.6
130211 10:57:08 InnoDB: Using Linux native AIO
130211 10:57:08 InnoDB: Initializing buffer pool, size = 128.0M
130211 10:57:08 InnoDB: Completed initialization of buffer pool
130211 10:57:08 InnoDB: highest supported file format is Barracuda.
130211 10:57:09 InnoDB: Waiting for the background threads to start
130211 10:57:10 InnoDB: 1.1.8 started; log sequence number 3169303
130211 10:57:11 [Note] Event Scheduler: Loaded 0 events
130211 10:57:11 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/var/run/mysql/mysql.sock' port: 0 MySQL Community Server (GPL)
130211 10:57:46 [Note] /usr/libexec/mysqld: Normal shutdown
130211 10:57:46 [Note] Event Scheduler: Purging the queue. 0 events
130211 10:57:48 [Warning] /usr/libexec/mysqld: Forcing close of thread 4 user: 'sqlgreyuser'
130211 10:57:48 InnoDB: Starting shutdown...
130211 10:57:50 InnoDB: Shutdown completed; log sequence number 3169313
130211 10:57:50 [Note] /usr/libexec/mysqld: Shutdown complete
130211 10:57:50 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
130211 10:57:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130211 10:57:53 [Note] Plugin 'FEDERATED' is disabled.
130211 10:57:53 InnoDB: The InnoDB memory heap is disabled
130211 10:57:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130211 10:57:53 InnoDB: Compressed tables use zlib 1.2.6
130211 10:57:53 InnoDB: Using Linux native AIO
130211 10:57:53 InnoDB: Initializing buffer pool, size = 128.0M
130211 10:57:53 InnoDB: Completed initialization of buffer pool
130211 10:57:53 InnoDB: highest supported file format is Barracuda.
130211 10:57:53 InnoDB: Waiting for the background threads to start
130211 10:57:54 InnoDB: 1.1.8 started; log sequence number 3169313
130211 10:57:54 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130211 10:57:54 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130211 10:57:54 [Note] Server socket created on IP: '0.0.0.0'.
130211 10:57:54 [Note] Event Scheduler: Loaded 0 events
130211 10:57:54 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/var/run/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
130211 12:39:26 [Note] /usr/libexec/mysqld: Normal shutdown
130211 12:39:26 [Note] Event Scheduler: Purging the queue. 0 events
130211 12:39:27 InnoDB: Starting shutdown...
130211 12:39:28 InnoDB: Shutdown completed; log sequence number 3181744
130211 12:39:28 [Note] /usr/libexec/mysqld: Shutdown complete
130211 12:39:28 mysqld_safe mysqld from pid file /var/lib/mysql/pluto.pid ended
130211 12:40:20 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130211 12:40:21 [Note] Plugin 'FEDERATED' is disabled.
130211 12:40:21 InnoDB: The InnoDB memory heap is disabled
130211 12:40:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130211 12:40:21 InnoDB: Compressed tables use zlib 1.2.6
130211 12:40:21 InnoDB: Using Linux native AIO
130211 12:40:21 InnoDB: Initializing buffer pool, size = 128.0M
130211 12:40:21 InnoDB: Completed initialization of buffer pool
130211 12:40:21 InnoDB: highest supported file format is Barracuda.
130211 12:40:22 InnoDB: Waiting for the background threads to start
130211 12:40:23 InnoDB: 1.1.8 started; log sequence number 3181744
130211 12:40:24 [Note] Event Scheduler: Loaded 0 events
130211 12:40:24 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/var/run/mysql/mysql.sock' port: 0 MySQL Community Server (GPL)
130211 12:41:42 [Note] /usr/libexec/mysqld: Normal shutdown
130211 12:41:42 [Note] Event Scheduler: Purging the queue. 0 events
130211 12:41:44 [Warning] /usr/libexec/mysqld: Forcing close of thread 3 user: 'sqlgreyuser'
130211 12:41:45 InnoDB: Starting shutdown...
130211 12:41:46 InnoDB: Shutdown completed; log sequence number 3181754
130211 12:41:46 [Note] /usr/libexec/mysqld: Shutdown complete
130211 12:41:46 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended
130211 12:41:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130211 12:41:48 [Note] Plugin 'FEDERATED' is disabled.
130211 12:41:48 InnoDB: The InnoDB memory heap is disabled
130211 12:41:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130211 12:41:48 InnoDB: Compressed tables use zlib 1.2.6
130211 12:41:48 InnoDB: Using Linux native AIO
130211 12:41:48 InnoDB: Initializing buffer pool, size = 128.0M
130211 12:41:48 InnoDB: Completed initialization of buffer pool
130211 12:41:48 InnoDB: highest supported file format is Barracuda.
130211 12:41:49 InnoDB: Waiting for the background threads to start
130211 12:41:50 InnoDB: 1.1.8 started; log sequence number 3181754
130211 12:41:50 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130211 12:41:50 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130211 12:41:50 [Note] Server socket created on IP: '0.0.0.0'.
130211 12:41:50 [Note] Event Scheduler: Loaded 0 events
130211 12:41:50 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.28-log' socket: '/var/run/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Feb 11, 2013 9:54 pm Post subject: |
|
|
Are two MTAs enabled?
Also run "mysql_upgrade" and what weird behavior you are getting from mysql?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Mon Feb 11, 2013 9:59 pm Post subject: |
|
|
I would rather use postfix but can't get it to start either. Used the sms-chooseMTA.sh command and selected postfix.
> smsconfig postfix st
Service [1;37m postfix [0m [25G[ [1;33mStopped [0m ]
> smsconfig sendmail st
Service [1;37m sendmail [0m [25G[ [1;31mDisabled[0m ] |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Mon Feb 11, 2013 10:18 pm Post subject: Postfix won't start |
|
|
/etc/rc.d/rc.postfix start
gives a Starting postfix MTA: /usr/sbin/postfix start message
smsconfig postfix st shows service as stopped
smsconfig sendmail st shows service as disabled |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Mon Feb 11, 2013 10:52 pm Post subject: |
|
|
If postfix is stopped something is wrong..
start postfix with (in case it's running)
Code: | /etc/rc.d/rc.postfix restart |
and look at log
Code: | tail -50 /var/log/maillog |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Mon Feb 11, 2013 11:36 pm Post subject: RE: |
|
|
Here's the last 50 of the log file after I "restart" the server. I think it has something to do with the permissions on the master.cf file???
Thanks so much for your help!!!
> tail -50 /var/log/maillog
Feb 11 14:25:41 pluto MailScanner[2293]: Reading configuration file /opt/MailScanner/etc/conf.d/README
Feb 11 14:25:41 pluto MailScanner[2293]: Read 869 hostnames from the phishing whitelist
Feb 11 14:25:41 pluto MailScanner[2293]: Read 4857 hostnames from the phishing blacklists
Feb 11 14:25:41 pluto MailScanner[2293]: Using SpamAssassin results cache
Feb 11 14:25:41 pluto MailScanner[2293]: Connected to SpamAssassin cache database
Feb 11 14:25:42 pluto MailScanner[2293]: Enabling SpamAssassin auto-whitelist functionality...
Feb 11 14:25:42 pluto MailScanner[2293]: Connected to Processing Attempts Database
Feb 11 14:25:42 pluto MailScanner[2293]: Found 0 messages in the Processing Attempts Database
Feb 11 14:25:42 pluto MailScanner[2293]: Using locktype = flock
Feb 11 14:26:25 pluto postfix/postqueue[2688]: warning: Mail system is down -- accessing queue directly
Feb 11 14:26:28 pluto postfix/postqueue[2697]: warning: Mail system is down -- accessing queue directly
Feb 11 14:26:44 pluto postfix/postsuper[2719]: 296C7B015FC: removed
Feb 11 14:26:44 pluto postfix/postsuper[2719]: Deleted: 1 message
Feb 11 14:26:44 pluto postfix/postqueue[2724]: warning: Mail system is down -- accessing queue directly
Feb 11 14:26:51 pluto postfix/postqueue[2738]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:03 pluto postfix/postqueue[2759]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:09 pluto postfix/postsuper[2774]: 32920B015E4: removed
Feb 11 14:27:09 pluto postfix/postsuper[2774]: Deleted: 1 message
Feb 11 14:27:10 pluto postfix/postqueue[2779]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:17 pluto postfix/postqueue[2791]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:23 pluto postfix/postqueue[2812]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:28 pluto postfix/postqueue[2826]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:31 pluto postfix/postsuper[2837]: 4C41AB015E5: removed
Feb 11 14:27:31 pluto postfix/postsuper[2837]: Deleted: 1 message
Feb 11 14:27:31 pluto postfix/postqueue[2842]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:36 pluto postfix/postsuper[2855]: 7FA0AB015E7: removed
Feb 11 14:27:36 pluto postfix/postsuper[2855]: Deleted: 1 message
Feb 11 14:27:37 pluto postfix/postqueue[2859]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:42 pluto postfix/postsuper[2878]: 638FEB015E6: removed
Feb 11 14:27:42 pluto postfix/postsuper[2878]: Deleted: 1 message
Feb 11 14:27:42 pluto postfix/postqueue[2883]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:47 pluto postfix/postsuper[2896]: 84623B015FD: removed
Feb 11 14:27:47 pluto postfix/postsuper[2896]: Deleted: 1 message
Feb 11 14:27:48 pluto postfix/postqueue[2901]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:52 pluto postfix/postsuper[2914]: A4E0EB015FE: removed
Feb 11 14:27:52 pluto postfix/postsuper[2914]: Deleted: 1 message
Feb 11 14:27:52 pluto postfix/postqueue[2918]: warning: Mail system is down -- accessing queue directly
Feb 11 14:27:58 pluto postfix/postsuper[2935]: C2821B015FF: removed
Feb 11 14:27:58 pluto postfix/postsuper[2935]: Deleted: 1 message
Feb 11 14:27:59 pluto postfix/postqueue[2940]: warning: Mail system is down -- accessing queue directly
Feb 11 14:28:02 pluto postfix/postsuper[2954]: D8867B01600: removed
Feb 11 14:28:02 pluto postfix/postsuper[2954]: Deleted: 1 message
Feb 11 14:28:02 pluto postfix/postqueue[2958]: warning: Mail system is down -- accessing queue directly
Feb 11 14:28:06 pluto postfix/postsuper[2969]: E7A9FB015E0: removed
Feb 11 14:28:06 pluto postfix/postsuper[2969]: Deleted: 1 message
Feb 11 14:28:07 pluto postfix/postqueue[2974]: warning: Mail system is down -- accessing queue directly
Feb 11 14:35:17 pluto postfix/postqueue[3279]: warning: Mail system is down -- accessing queue directly
Feb 11 14:35:24 pluto postfix/postfix-script[3301]: fatal: the Postfix mail system is not running
Feb 11 14:35:25 pluto postfix/postfix-script[3373]: starting the Postfix mail system
Feb 11 14:35:25 pluto postfix/master[3374]: fatal: /etc/postfix/master.cf: line 12: inet service cannot be private |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Feb 12, 2013 12:18 am Post subject: |
|
|
Did you change something in main.cf?
the problem occur from sqlgrey, actually, try to start it if not running and look for error in /var/log/maillog
Code: | ps aux|grep sqlgrey |
Code: | /etc/rc.d/rc.sqlgrey start |
sqlgrey depend in mysql though...
If you haven't alter main.cf, for start try to disable greylisting by removing from smtpd_recipient_restrictions
check_policy_service inet:127.0.0.1:2501
Code: | postcoconf -e "smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination" |
and start postfix
Code: | smsconfig postfix start |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Tue Feb 12, 2013 1:39 am Post subject: running |
|
|
I finaly got it to start. The problem was in the master.cf file. (I don't think I had altered it before the issue occured.)
Several line items with an "inet" type were marked with "-" instead of "n" (private) which was causing problems with starting the service. Still trying to get it working with my 3rd party smtp server, at least it's running...
Hopefully this will help others...
gerasimos_h, thanks so much for your help!!! |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Feb 12, 2013 7:00 am Post subject: |
|
|
I admit that master.cf file in SMS is untouched from postfix-2.5.x version, but it's still the same default conf even in latest postfix, so I don't think master.cf is actually your problem.
Can you post your postfix configuration "postconf -n" and what you want to succeed?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Tue Feb 12, 2013 5:33 pm Post subject: RE. |
|
|
The goal is to email items and status message from avantfax and system and server status messages through my smtp server to my existing personal email account. The messages are being delivered to the postfix message queue and then bounce back from the smtp server. This was working last week.
It looks like I need to figure out how to prevent the spamhaus project from blocking my IP Address. I clicked on the link and removed my ip address from their blocklist. The instructions didn't make much sense on how I might prevent it from getting blocklisted again. I think this has been my problem the whole time. Any other thoughts?
"Undeliverable" message is pasted below. (I removed ip addresses and server names due to the public nature of the forum)
Thanks!
> postconf -n
alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases, nis:mail.aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin/
config_directory = /etc/postfix
daemon_directory = /usr/libexec/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
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps
mail_spool_directory = /var/spool/mail
mailq_path = /usr/sbin/mailq
manpage_directory = /usr/man
milter_default_action = accept
myorigin = pluto
newaliases_path = /usr/sbin/newaliases
relayhost = mail.SERVER_NAME_REMOVED.com
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_password_map
smtp_use_tls = yes
smtpd_milters = unix:/var/run/clamav-milter/milter.sock
smtpd_recipient_restrictions = permit_mynetworks permit_sas1_authenticated reject_unauth_destination
smtpd_reject_unlisted_recipient = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
smtpd_tls_key_file = /etc/ssl/certs/dovecot.pem
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual, $alias_maps
Undeliverable message:
This is the mail system at host pluto.localdomain.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
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 attached returned message.
The mail system
<RECIPIENT_NAME@DOMAIN.com>: host
mail.DOMAIN.com[IP REMOVED] said: 554 5.7.1 Service
unavailable; Client host [IP REMOVED] blocked using
sbl-xbl.spamhaus.org; http://www.spamhaus.org/query/bl?ip=IPREMOVED
(in reply to RCPT TO command) |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue Feb 12, 2013 9:00 pm Post subject: |
|
|
If you want a real straight through mail server then you need a static IP from your ISP and usually those are clean, all dynamic IPs are blacklisted.
So if you want to sent a message to e.g. a gmail or your domain email you need to do.
Code: | postcon -e "smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd"
postconf -e "smtp_sasl_security_options ="
postconf -e "transport_maps = hash:/etc/postfix/transport" |
create/edit /etc/postfix/transport with
Code: | my@email.com :smtp.myemailserver.com |
create/edit /etc/postfix/sasl_passwd with
Code: | smtp.myemailserver.com username:password |
You can also add a virtual user e.g. sent message to admin@pluto > my@email.com
create/edit /etc/postfix/virtual with
Code: | admin@pluto my@email.com |
Also for virtual you need to do
Code: | postconf -e "virtual_alias_maps = hash:/etc/postfix/virtual" |
And finally
Code: | postmap /etc/postfix/transport
postmap /etc/postfix/sasl_passwd
postmap /etc/postfix/virtual
postfix reload |
Additional you can rewrite email headers with /etc/postfix/generic
Also relayhost it's not necessary
Code: | postconf -e "relayhost =" |
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Tue Feb 12, 2013 11:00 pm Post subject: |
|
|
Thanks Again. Everything seems to be working well.
I'll owe you a lunch if you're ever in Albuquerque. |
|
Back to top |
|
gregpilot Member
Joined: 20 Sep 2012 Posts: 28
|
Posted: Fri Feb 15, 2013 1:36 am Post subject: |
|
|
It worked great for about a day and got blacklisted again. Is a static IP the only way around getting blacklisted? |
|
Back to top |
|
|