Can anyone explain localhost phenomenon?

Gabor Gombas gombasg at digikabel.hu
Sun Feb 3 09:42:15 EST 2013


IIRC MySQL tries to use an UNIX socket instead of TCP for connecting to
the server when it sees the "localhost" string. If e.g. sendmail runs
chrooted, then it won't see the MySQL server's socket, therefore it
won't be able to connect.

Gabor

On Sun, Feb 03, 2013 at 11:50:46AM +0000, Charles Bradshaw wrote:
> If I specify localhost as the host name for both imapd and sendmail sql plugin
> authentication like this:
> 
> eg /etc/imapd.conf contains:
>   sasl_sql_hostnames:localhost:3306     << changing localhost to mail-host here
> 
> and /etc/sasl2/Sendmail.conf contains:
>   sql_hostnames:localhost:3306          << and here works!
> 
> Using localhost the connection to mysql fails for the sendmail connection
> while the imap connection succeeds.  On the other hand, if I use the servers
> real host name instead of localhost then both connections succeed!
> 
> This must be something to do with the sql plugin and mysql using a socket when
> connecting to localhost! But what?
> 
> Command line connections to mysql, from 2 different terminals, to localhost
> for the same user like this:
> 
> $ mysql mail --user=****** --password=*******
> 
> work just fine!
> 
> Confused, Charles Bradshaw
> 
> ----
> Cyrus Home Page: http://www.cyrusimap.org/
> List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
> To Unsubscribe:
> https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus


More information about the Info-cyrus mailing list