apparently not sending or receiving emails

Scott Silva ssilva at sgvwater.com
Wed May 20 17:59:13 IST 2009


on 5-20-2009 7:19 AM Dave Filchak spake the following:
> Martin Hepworth wrote:
>>
>>
>> 2009/5/20 Dave Filchak <submit at zuka.net <mailto:submit at zuka.net>>
>>
>>     Hi folks,
>>
>>     Today a problem arose in my mail setup that I am trying to track
>>     down. I can no longer send or receive emails.
>>
>>     I think it has something to do with mysql but I have had little
>>     luck so far.
>>
>>     Mysql is running and I can log in and select and search tables.
>>     But, as you will see below, the logs indicate that there are
>>     issues connecting through the mysql.sock. You will also note that
>>     the path it is trying to connect to is /var/run/mysql.sock while
>>     the actual location is at /var/run/mysqld/mysql.sock
>>
>>     Here is my systems specs:
>>
>>     2.6.9-34.ELsmp #1 SMP Thu Mar 9 06:23:23 GMT 2006 x86_64 x86_64
>>     x86_64 GNU/Linux
>>     This is CentOS release 4.3 (Final)
>>     This is Perl version 5.008005 (5.8.5)
>>
>>     This is MailScanner version 4.74.15
>>     Module versions are:
>>     1.00    AnyDBM_File
>>     1.20    Archive::Zip
>>     0.22    bignum
>>     1.03    Carp
>>     1.41    Compress::Zlib
>>     1.119   Convert::BinHex
>>     0.17    Convert::TNEF
>>     2.121   Data::Dumper
>>     2.27    Date::Parse
>>     1.00    DirHandle
>>     1.05    Fcntl
>>     2.73    File::Basename
>>     2.08    File::Copy
>>     2.01    FileHandle
>>     1.06    File::Path
>>     0.20    File::Temp
>>     0.78    Filesys::Df
>>     1.35    HTML::Entities
>>     3.56    HTML::Parser
>>     2.37    HTML::TokeParser
>>     1.23    IO
>>     1.14    IO::File
>>     1.13    IO::Pipe
>>     2.04    Mail::Header
>>     1.87    Math::BigInt
>>     0.20    Math::BigRat
>>     3.05    MIME::Base64
>>     5.427   MIME::Decoder
>>     5.427   MIME::Decoder::UU
>>     5.427   MIME::Head
>>     5.427   MIME::Parser
>>     3.03    MIME::QuotedPrint
>>     5.427   MIME::Tools
>>     0.11    Net::CIDR
>>     1.25    Net::IP
>>     0.16    OLE::Storage_Lite
>>     1.04    Pod::Escapes
>>     3.05    Pod::Simple
>>     1.08    POSIX
>>     1.19    Scalar::Util
>>     1.77    Socket
>>     2.13    Storable
>>     1.4     Sys::Hostname::Long
>>     0.18    Sys::Syslog
>>     1.26    Test::Pod
>>     0.7     Test::Simple
>>     1.9707  Time::HiRes
>>     1.02    Time::localtime
>>
>>     Optional module versions are:
>>     1.32    Archive::Tar
>>     0.22    bignum
>>     1.82    Business::ISBN
>>     1.10    Business::ISBN::Data
>>     1.08    Data::Dump
>>     1.814   DB_File
>>     1.13    DBD::SQLite
>>     1.58    DBI
>>     1.15    Digest
>>     1.01    Digest::HMAC
>>     2.36    Digest::MD5
>>     2.11    Digest::SHA1
>>     1.00    Encode::Detect
>>     0.17008 Error
>>     0.19    ExtUtils::CBuilder
>>     2.18    ExtUtils::ParseXS
>>     2.36    Getopt::Long
>>     0.44    Inline
>>     1.08    IO::String
>>     1.04    IO::Zlib
>>     2.21    IP::Country
>>     0.22    Mail::ClamAV
>>     3.002005        Mail::SpamAssassin
>>     v2.004  Mail::SPF
>>     1.999001        Mail::SPF::Query
>>     0.2808  Module::Build
>>     0.20    Net::CIDR::Lite
>>     0.63    Net::DNS
>>     0.002.2 Net::DNS::Resolver::Programmable
>>     0.31    Net::LDAP
>>     4.004  NetAddr::IP
>>     1.94    Parse::RecDescent
>>     missing SAVI
>>     2.64    Test::Harness
>>     0.95    Test::Manifest
>>     1.95    Text::Balanced
>>     1.35    URI
>>     0.7203  version
>>     0.65    YAML
>>
>>     And before you say it, I know the OS is old but we had an
>>     application running on this machine that did not allow us to
>>     update. I think we could now so maybe I should do that. But let me
>>     finish describing the issue.
>>
>>     Today I started getting these in my logs:
>>
>>     May 19 08:29:10 rosewood MailScanner: MailScanner setting UID to
>>     postfix (80)
>>     May 19 08:29:12 rosewood MailScanner: Unable to initialise
>>     database connection: Can't connect to local MySQL server through
>>     socket '/var/run/mysql.sock' (2) at
>>     /usr/lib/MailScanner/MailScanner/CustomFunctions/SQLBlackWhiteList.pm
>>     line 116
>>     May 19 08:29:12 rosewood MailScanner: Unable to initialise
>>     database connection: Can't connect to local MySQL server through
>>     socket '/var/run/mysql.sock' (2) at
>>     /usr/lib/MailScanner/MailScanner/CustomFunctions/MailWatch.pm line 82
>>     May 19 08:29:12 rosewood MailScanner: Could not use Custom
>>     Function code MailScanner::CustomConfig::InitMailWatchLogging, it
>>     could not be "eval"ed. Make sure the module is correct with perl
>>     -wc at /usr/lib/MailScanner/MailScanner/Config.pm line 873
>>
>>     When I run perl -wc perl -wc
>>     /usr/lib/MailScanner/MailScanner/Config.pm
>>
>>     I get:
>>
>>     Useless use of hash element in void context at
>>     /usr/lib/MailScanner/MailScanner/Config.pm line 892.
>>     Use of implicit split to @_ is deprecated at
>>     /usr/lib/MailScanner/MailScanner/Config.pm line 2085.
>>     /usr/lib/MailScanner/MailScanner/Config.pm syntax OK
>>
>>
>>     and more logs:
>>
>>     May 19 13:16:56 rosewood postfix/trivial-rewrite[31466]: fatal:
>>     mysql:/etc/postfix/maps/sql-aliases.cf
>>     <http://sql-aliases.cf>(0,lock|fold_fix): table lookup problem
>>     May 19 13:16:56 rosewood postfix/trivial-rewrite[31467]: warning:
>>     connect to mysql server localhost: Can't connect to local MySQL
>>     server through socket '/var/run/mysql.so
>>     ck' (2)
>>     May 19 13:16:56 rosewood postfix/trivial-rewrite[31467]: fatal:
>>     mysql:/etc/postfix/maps/sql-aliases.cf
>>     <http://sql-aliases.cf>(0,lock|fold_fix): table lookup problem
>>     May 19 13:16:56 rosewood postfix/trivial-rewrite[31468]: warning:
>>     connect to mysql server localhost: Can't connect to local MySQL
>>     server through socket '/var/run/mysql.so
>>     ck' (2)
>>     May 19 13:16:56 rosewood postfix/trivial-rewrite[31468]: fatal:
>>     mysql:/etc/postfix/maps/sql-aliases.cf
>>     <http://sql-aliases.cf>(0,lock|fold_fix): table lookup problem
>>     May 19 13:16:57 rosewood postfix/cleanup[28938]: warning:
>>     premature end-of-input on private/rewrite socket while reading
>>     input attribute name
>>     May 19 13:16:57 rosewood postfix/smtpd[29109]: warning: premature
>>     end-of-input on private/rewrite socket while reading input
>>     attribute name
>>     May 19 13:16:57 rosewood postfix/cleanup[28938]: warning: problem
>>     talking to service rewrite: Connection reset by peer
>>     May 19 13:16:57 rosewood postfix/smtpd[29109]: warning: problem
>>     talking to service rewrite: Success
>>
>>
>>     Upon restart of MailScanner, it seems to start but MailWatch seems
>>     to be dead. However, I can still not send or receive emails.
>>
>>     Anyone see anything that might give me a hint?
>>
>>     Dave
>>
>>
>>
>>
>>
>>     --     MailScanner mailing list
>>     mailscanner at lists.mailscanner.info
>>     <mailto:mailscanner at lists.mailscanner.info>
>>     http://lists.mailscanner.info/mailman/listinfo/mailscanner
>>
>>     Before posting, read http://wiki.mailscanner.info/posting
>>
>>     Support MailScanner development - buy the book off the website!
>>
>>
>> Dave
>>
>> anything in the mysql logs? Can you connect to mysql on the command
>> line - ie is mysql actually running?
>>
>> -- 
>> Martin Hepworth
>> Oxford, UK
> Martin,
> 
> Yes, mysql was running but it turns out it was a problem with the
> mysql.sock file. I am still scratching my head over this one but the
> mail system used to look for this file at /var/run/mysqld/mysql.sock
> However, my ISP had a huge problem with their UPS backup generators and
> power went down rather abruptly yesterday. When the server came up, it
> was looking for this file at /var/run/mysql.sock. And, for the life of
> me, I could not get it to look for it in the original location. So, I
> finally gave up and moved the location to /var/run/ However, I had to
> set the permissions of that directory to allow write access for the
> world ... possibly not a good thing. Is there a stand location for this
> and what permissions are normal.
> 
> At any rate .. I do have mail flowing again but would love to know why
> the location shifted. Probably a misconfiguration somewhere.
> 
> Dave
The actual location is set in the my.cnf file, but I am not sure where
MailScanner and mailwatch might be finding this at. Maybe there are 2 copies
of my.cnf on the system, and MailScanner is picking up the wrong one.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 258 bytes
Desc: OpenPGP digital signature
Url : http://lists.mailscanner.info/pipermail/mailscanner/attachments/20090520/edbafa8e/signature.bin


More information about the MailScanner mailing list