You are not logged in.

#1 2011-01-08 17:52:54

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

[RESOLVED]SMTP Error Sending Mail (Postfix)

I'm having a problem with Postfix sending email. To be more specific, Postfix sends mail perfect but when my web server running webmail (RoundCube) connects to my mail server to send email, it fails & there is nothing in the logs that explain to me why:

Jan  8 11:53:02 mail dovecot: imap-login: Login: user=<carlos>, method=PLAIN, rip=192.168.0.201, lip=192.168.0.200, mpid=2161, TLS
Jan  8 11:53:02 mail postfix/smtpd[2162]: connect from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]
Jan  8 11:53:02 mail postfix/smtpd[2162]: setting up TLS connection from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]
Jan  8 11:53:02 mail postfix/smtpd[2162]: Anonymous TLS connection established from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Jan  8 11:53:02 mail postfix/smtpd[2162]: disconnect from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]
Jan  8 11:53:02 mail dovecot: imap(carlos): Disconnected: Logged out bytes=12/341

When I try sending mail from a client like Thunderbird / Evolution, it works perfect. When I try to send mail from my web server [192.168.0.201], I get a browser error:

SMTP Error: 250 (Authentication Error)

However I don't see a detailed error in /var/log/mail.log as shown above. How can I find out what's causing the error?

My web server [192.168.0.201] is listed in 'mynetworks' for trusted relay. My mail server in question is obviously 192.168.0.200.

Anyone know what I need to do in order to have Postfix give me some info on why my web server can't send mail from webmail?

Last edited by Carlwill (2011-01-12 17:26:46)


./

Offline

#2 2011-01-09 12:24:10

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Are there any logs on the web server side?
Try disabling TLS for debugging -- it's pretty redundant anyway on a local switched network.
What happens if you do a manual SMTP session with telnet?

Offline

#3 2011-01-10 16:22:28

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

fukawi2 wrote:

Are there any logs on the web server side?
Try disabling TLS for debugging -- it's pretty redundant anyway on a local switched network.
What happens if you do a manual SMTP session with telnet?

On the web server side there are logs but nothing related to this issue from what I can see since the web server [192.168.0.201] is the client connecting to the mail server [192.168.0.200] & no applications are really calling Apache on 192.168.0.201.

In my Postfix main.cf, I commented out the following:

# TLS settings
#smtpd_tls_security_level = may
#smtpd_tls_cert_file = /etc/ssl/certs/mail.crt
#smtpd_tls_key_file = /etc/ssl/private/mail.key
#smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_scache
#smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
#smtpd_tls_loglevel = 1

I then reloaded Postfix and ran 'postconf -n' to verify the settings were disable from 'main.cf':

[root@mail postfix]# postconf -n
alias_database = $alias_maps
alias_maps = hash:/etc/postfix/aliases
bounce_queue_lifetime = 1d
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_list = 192.168.0.201
delay_warning_time = 4h
home_mailbox = mail/
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
manpage_directory = /usr/share/man
message_size_limit = 20480000
mydestination = $myhostname, $mydomain, mail.$mydomain
mydomain = iamghost.org
myhostname = mail.iamghost.org
mynetworks = $config_directory/mynetworks
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
recipient_delimiter = +
relayhost = 
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
smtp_helo_timeout = 60s
smtpd_recipient_restrictions = permit_mynetworks,    reject_unauth_destination,    reject_non_fqdn_recipient,       reject_unknown_recipient_domain,       reject_non_fqdn_helo_hostname,       reject_invalid_helo_hostname,    reject_rbl_client zen.spamhaus.org,       reject_rbl_client bl.spamcop.net,    check_client_access             hash:/etc/postfix/client_access
smtpd_sender_restrictions = permit_mynetworks
unknown_local_recipient_reject_code = 450

Does this mean that TLS is disable for Postfix? Obviously I didn't touch or mess with the Dovecot (IMAP4) settings...


./

Offline

#4 2011-01-10 22:08:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Carlwill wrote:

Does this mean that TLS is disable for Postfix?

Yes. It should have no impact on Dovecot

Offline

#5 2011-01-11 19:09:16

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

So I've disable TLS (I think I did) in Postfix because when I telnet into my email server, I no longer see TLS:

[cmennens@tuna ~]$ telnet mail.iamghost.org 25
Trying 192.168.0.200...
Connected to mail.iamghost.org.
Escape character is '^]'.
220 mail.iamghost.org ESMTP Postfix
EHLO tuna.ideorlando.org
250-mail.iamghost.org
250-PIPELINING
250-SIZE 20480000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:carlos@iamghost.org
250 2.1.0 Ok
rcpt to:carlos.mennens@gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject:Test Email Message
This is a test
.
250 2.0.0 Ok: queued as 4E7E7140522
quit
221 2.0.0 Bye
Connection closed by foreign host.

Now with TLS disable, I restart Postfix and begin to 'tail' the log files for Postfix and still get the same error on the browser side but when I view the logs, I see:

Jan 11 13:29:32 mail dovecot: imap-login: Login: user=<carlos>, method=PLAIN, rip=192.168.0.201, lip=192.168.0.200, mpid=2190, TLS
Jan 11 13:29:32 mail postfix/smtpd[2191]: connect from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostname: [url=http://www.iamghost.org]www.iamghost.org[/url] ~? 127.0.0.0/8
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostaddr: 192.168.0.201 ~? 127.0.0.0/8
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostname: [url=http://www.iamghost.org]www.iamghost.org[/url] ~? 192.168.0.0/24
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostaddr: 192.168.0.201 ~? 192.168.0.0/24
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 220 mail.iamghost.org ESMTP Postfix
Jan 11 13:29:32 mail postfix/smtpd[2191]: watchdog_pat: 0x1530c60
Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: EHLO [url=http://www.iamghost.org]www.iamghost.org[/url]
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-mail.iamghost.org
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-PIPELINING
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-SIZE 20480000
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-VRFY
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_list_match: [url=http://www.iamghost.org]www.iamghost.org[/url]: no match
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_list_match: 192.168.0.201: no match
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-ETRN
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-ENHANCEDSTATUSCODES
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-8BITMIME
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250 DSN
Jan 11 13:29:32 mail postfix/smtpd[2191]: watchdog_pat: 0x1530c60
Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: RSET
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250 2.0.0 Ok
Jan 11 13:29:32 mail postfix/smtpd[2191]: watchdog_pat: 0x1530c60
Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: QUIT
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 221 2.0.0 Bye
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostname: [url=http://www.iamghost.org]www.iamghost.org[/url] ~? 127.0.0.0/8
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostaddr: 192.168.0.201 ~? 127.0.0.0/8
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostname: [url=http://www.iamghost.org]www.iamghost.org[/url] ~? 192.168.0.0/24
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_hostaddr: 192.168.0.201 ~? 192.168.0.0/24
Jan 11 13:29:32 mail postfix/smtpd[2191]: disconnect from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]
Jan 11 13:29:32 mail dovecot: imap(carlos): Disconnected: Logged out bytes=12/341

I left TLS and the dovecot.conf file alone since I've got no issues reading IMAP4 messages from Thunderbird or the webmail server. I just can't understand why I can't send mail from my web server via my mail server. This makes no sense to me and I'm exhausted trying to understand this. Does the above make any sense or shed any light on the problem?


./

Offline

#6 2011-01-11 19:49:07

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Jan  8 11:53:02 mail postfix/smtpd[2162]: connect from [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]

?? Something is screwey there. Are you running postfix on the webserver, and have it set to relay through the mail server? If so, what is the config on the webserver?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#7 2011-01-11 20:05:45

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

No I'm not running Postfix on the 'web' server. I'm running Postfix on the 'mail' server.

mail = 192.168.0.200
www = 192.168.0.201

The web server is running Apache & RoundCube Webmail so when users go to 192.168.0.201/webmail, they're prompted with the login for RoundCube which then passes IMAP4 authentication to my mail server (Dovecot). They login fine and can read all the messages in their mailbox that resides on 192.168.0.200 (mail) but the problem is when they try and send mail, they get the error. Postfix should allow my web server to send mail since 192.168.0.201/24 is listed in Postfix 'mynetworks' file. Does this make sense? There are no logs to really review on the web server because if you think about it, the web server is doing everything correct. It's passing IMAP and SMTP off to the mail server as expected. The error is being generated from 192.168.0.200 to 192.168.0.201. Why? This I do not know...


./

Offline

#8 2011-01-11 21:24:57

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Ah. I see. A more typical setup I run into is the web server having a local postfix instance, that relays to the mail server for final outbound delivery. This way the web node can have a fast async style local first delivery -- queued on the web server's postfix instance before relay.

So one of the fist things to look at is..

EHLO [url=http://www.iamghost.org]www.iamghost.org[/url]

This is not really an appropriate format for a server name for smtp. Start cleaning things up before trying to troubleshoot further.

Also, are you sure there are no log messages in the apache log? Roundcube would make making outbound connection attempts to the mailserver, and should be logging the failure, and the underlying reason for the failure (hopefully).

I also assume your roundcube config has $rcmail_config['default_host'] set to the ip address of your mail server.... or are you relying on php's configuration for sending mail (apparently roundcube can default back to using php's php.ini sendmail config if you tell it to)?

Last edited by cactus (2011-01-11 21:29:03)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2011-01-11 22:05:55

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,223
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: EHLO [url=http://www.iamghost.org]www.iamghost.org[/url]
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-mail.iamghost.org
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-PIPELINING
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-SIZE 20480000
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-VRFY
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_list_match: [url=http://www.iamghost.org]www.iamghost.org[/url]: no match
Jan 11 13:29:32 mail postfix/smtpd[2191]: match_list_match: 192.168.0.201: no match
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-ETRN
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-ENHANCEDSTATUSCODES
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250-8BITMIME
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250 DSN
Jan 11 13:29:32 mail postfix/smtpd[2191]: watchdog_pat: 0x1530c60
Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: RSET
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 250 2.0.0 Ok
Jan 11 13:29:32 mail postfix/smtpd[2191]: watchdog_pat: 0x1530c60
Jan 11 13:29:32 mail postfix/smtpd[2191]: < [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: QUIT
Jan 11 13:29:32 mail postfix/smtpd[2191]: > [url=http://www.iamghost.org]www.iamghost.org[/url][192.168.0.201]: 221 2.0.0 Bye

Roundcube appears to be:
1) Connect, and EHLO with a frivolous identification (as cactus has mentioned)
2) Immediately issues RSET to reset the session
3) QUIT the session.

There's not even an attempt to send a message with MAIL FROM, RCPT TO or DATA commands.

Offline

#10 2011-01-11 23:03:40

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

1st off let me thank both of you for sticking with me on this and being very helpful. It appears in my web servers RoundCube configuration, I don't have the SMTP HELO/EHLO value properly set. It's null / empty. I'm posting my RC SMTP snippet below:

$rcmail_config['smtp_server'] = 'mail.iamghost.org';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 25;

// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

// Optional SMTP authentication identifier to be used as authorization proxy
$rcmail_config['smtp_auth_cid'] = null;

// Optional SMTP authentication password to be used for smtp_auth_cid
$rcmail_config['smtp_auth_pw'] = null;

// SMTP HELO host 
// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages 
// Leave this blank and you will get the server variable 'server_name' or 
// localhost if that isn't defined. 
$rcmail_config['smtp_helo_host'] = '';

// SMTP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['smtp_timeout'] = 0;

So now this leads me to ask something I was wondering back when I built my web server. What is a proper naming convention for an Apache / web server? I set my webserver's hostname as 'www' and don't know if I should have set it to something else. Is it bad to name a server's hostname 'www'? I don't know if I should have named it 'websrv1' and then configured a CNAME / alias to point that entry to www.mydomain.tld.

Can anyone clarify on this?


./

Offline

#11 2011-01-12 00:59:41

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

Carlwill wrote:

1st off let me thank both of you for sticking with me on this and being very helpful. It appears in my web servers RoundCube configuration, I don't have the SMTP HELO/EHLO value properly set. It's null / empty. I'm posting my RC SMTP snippet below:

$rcmail_config['smtp_server'] = 'mail.iamghost.org';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 25;

// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

// Optional SMTP authentication identifier to be used as authorization proxy
$rcmail_config['smtp_auth_cid'] = null;

// Optional SMTP authentication password to be used for smtp_auth_cid
$rcmail_config['smtp_auth_pw'] = null;

// SMTP HELO host 
// Hostname to give to the remote server for SMTP 'HELO' or 'EHLO' messages 
// Leave this blank and you will get the server variable 'server_name' or 
// localhost if that isn't defined. 
$rcmail_config['smtp_helo_host'] = '';

// SMTP connection timeout, in seconds. Default: 0 (no limit)
$rcmail_config['smtp_timeout'] = 0;

Based on the comments in the config regarding the smtp_user and smtp_pass variables, and since you aren't using smtp authentication (you are using mynetworks ip based ACL), you should look for a way to disable smtp auth in roundcube.

// Leave this blank and you will get the server variable 'server_name' or 
// localhost if that isn't defined. 
$rcmail_config['smtp_helo_host'] = '';

Do you have server_name set to anything in your config?
It obviously isn't using localhost, since it is sending a weird bbcode formatted link url in the ehlo, which you see in the log on your mail server.

So now this leads me to ask something I was wondering back when I built my web server. What is a proper naming convention for an Apache / web server? I set my webserver's hostname as 'www' and don't know if I should have set it to something else. Is it bad to name a server's hostname 'www'? I don't know if I should have named it 'websrv1' and then configured a CNAME / alias to point that entry to www.mydomain.tld.

Can anyone clarify on this?

It is wholly up to you. I generally name my servers something like web001.example.com, with the numeric portion varying to the number of web servers in use. This also makes it nice for scriptability from the shell, and for automation. Then I point CNAME or A records as needed.

However, if you only have a single webserver for that domain, I see no problem with just using www as the hostname itself. Since _you_ have to manage the namespace, do whatever makes it easier for you to remember what is where (but keep in mind the potential hassle of renaming if you ever have to!).
smile

Also, you would not want to create a CNAME and point websrv1 to www. You would want to do the reverse. Name the server websrv1 (A record), and then create a CNAME for www and point it to that. Not sure if that is what you meant or not, as your wording was a tad unclear. I just want to provide some clarification, because you may want to later add a second webserver, such as websrv2, and if you want to roundrobin dns balance www to that server as well, you could then simply add a second CNAME record. It would also be easier to move www to another server.

bad:
www.example.com. A 192.168.1.1
websrv1.example.com. CNAME www.example.com.

good:
websrv1.example.com. A 192.168.1.1
www.example.com.  CNAME  websrv1.example.com.
; examples of roundrobin dns
; www.example.com.  CNAME  websrv2.example.com.
; www.example.com.  CNAME  websrv3.example.com.

Last edited by cactus (2011-01-12 01:05:28)


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2011-01-12 15:27:20

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

I checked my 'logs' directory in RoundCube and here is what I show:

[11-Jan-2011 13:36:44 -0500]: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/webmail/program/steps/mail/func.inc on line 1480 (POST /webmail/?_unlock=loading1294771004484?_task=mail&_action=send)
[11-Jan-2011 13:36:59] SMTP server does not support authentication (): 
[11-Jan-2011 13:36:59 -0500]: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/webmail/program/steps/mail/func.inc on line 1480 (POST /webmail/?_unlock=loading1294771018972?_task=mail&_action=send)
[12-Jan-2011 00:29:37] PHP Warning:  stream_socket_enable_crypto(): SSL: connection timeout in /var/www/webmail/program/include/rcube_imap_generic.php on line 720
[12-Jan-2011 00:29:37 -0500]: IMAP Error: Login failed for carlos from 70.119.216.42. Unable to negotiate TLS in /var/www/webmail/program/include/rcube_imap.php on line 180 (GET /webmail/?_task=mail&_remote=1&_action=check-recent&_t=1294810176133&_mbox=INBOX&_list=1&_=1294810176134&_unlock=0)
[12-Jan-2011 00:29:37] PHP Warning:  Cannot modify header information - headers already sent in /var/www/webmail/program/include/rcube_json_output.php on line 233
[12-Jan-2011 09:22:10] SMTP server does not support authentication (): 
[12-Jan-2011 09:22:10 -0500]: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/webmail/program/steps/mail/func.inc on line 1480 (POST /webmail/?_unlock=loading1294842130005?_task=mail&_action=send)
[12-Jan-2011 09:25:36] SMTP server does not support authentication (): 
[12-Jan-2011 09:25:36 -0500]: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /var/www/webmail/program/steps/mail/func.inc on line 1480 (POST /webmail/?_unlock=loading1294842336626?_task=mail&_action=send)

Does this make sense to anyone? Generally when I see 'Authentication Failure' errors, I think of something like SASL which I don't have enabled on Postfix. I just have TLS and plain authentication.

When I look at the line it references (1480), I see the following:

// log error
    if (!$sent)
      raise_error(array('code' => 800, 'type' => 'smtp', 'line' => __LINE__, 'file' => __FILE__,
                        'message' => "SMTP error: ".join("\n", $smtp_response)), TRUE, FALSE);

Last edited by Carlwill (2011-01-12 15:29:37)


./

Offline

#13 2011-01-12 17:28:03

Carlwill
Member
From: Orlando, FL
Registered: 2008-10-06
Posts: 560
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

The issue was in RC. I need to remove the following:


$rcmail_config['smtp_user'] = '%u';

$rcmail_config['smtp_pass'] = '%p';

If I remove %u & %p, it works fine.


./

Offline

#14 2011-01-12 22:01:41

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [RESOLVED]SMTP Error Sending Mail (Postfix)

hooray!
smile


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB