PDA

View Full Version : 550 authentication required


johnallen
01-03-2004, 01:39 PM
Squirrelmail on a fresh install of DirectAdmin provides the following error when you try to send mail.


ERROR:
Requested action not taken: mailbox unavailable
Server replied: 550 authentication required


This is on a Red Hat Linux server.

DirectAdmin Support
01-03-2004, 02:21 PM
Hello,

Not too sure. Check the exim logs (/var/log/exim/*) and make sure that 127.0.01 is in the relay_hosts.

John

toml
01-03-2004, 03:50 PM
The problem is that squirrelmail is not by default setup to handle virtual domains. What I did to get it to work was to comment out the $domain in the squirrelmail/config/config.php file and add the following:

$domain=$_SERVER['HTTP_HOST'];
while (sizeof(explode('.', $domain)) > 2) {
$domain = substr($domain, strpos($domain, '.') + 1);
}

/* $domain = 'domain.com'; */
$imapServerAddress = 'localhost';
$imapPort = 143;
$useSendmail = false;
$smtpServerAddress = 'localhost';
$smtpPort = 25;
$sendmail_path = '/usr/sbin/sendmail';
$pop_before_smtp = true;
$imap_server_type = 'uw';
$invert_time = false;
$optional_delimiter = 'detect';
$smtp_auth_mech = 'login';

The $domain part is configured for my setup, if you use a domain in the format of xxx.co.uk, then you may need to modify that part a bit.

Hope this helps.

uk_joker2003
01-05-2004, 09:27 AM
sorry for asking a really dumb question, How can i edit a php file from ssh?

thanks in advance

Phil

l0rdphi1
01-05-2004, 09:40 AM
Here (http://tutorials.beginners.co.uk/read/category/11/id/269) is a guide to vi.

S2S-Robert
01-05-2004, 11:43 AM
isn't squirrelmail by default installed on a DA server?

DirectAdmin Support
01-05-2004, 01:18 PM
Hello,

Yes, SquirrelMail is included.

John

uk_joker2003
01-05-2004, 01:27 PM
which squirrelmail directory do i modify the config file in i ahev squirrelmail and squirrelmail-1.4.2

ProWebUK
01-05-2004, 01:37 PM
i ahev squirrelmail and squirrelmail-1.4.2

The squirrelmail directory is a symlink to squirrelmail-1.4.2 or so it should be :)

The config will be in squirrelmail-1.4.2

Chris

uk_joker2003
01-05-2004, 03:00 PM
OK, I am guessing it's the below text. As you can see i have added in the above.

Could someone confirm it's in the right place?

/* The dns name and port for your imap server. */
global $imapServerAddress, $imapPort;
$imapServerAddress = 'localhost';
$imapPort = 143;

/**
* The domain part of local email addresses.
* This is for all messages sent out from this server.
* Reply address is generated by $username@$domain
* Example: In bob@foo.com, foo.com is the domain.
*/
global $domain;
$domain=$_SERVER['HTTP_HOST'];
while (sizeof(explode('.' $domain)) >2) { $domain = substr($domain, '.') + 1}
*/ $domain = 'server.catzmail.com';*/

/* Your SMTP server and port number (usually the same as the IMAP server). */
global $smtpServerAddress, $smtpPort;
$smtpServerAddress = 'localhost';
$smtpPort = 25;

/**
* Uncomment this if you want to deliver locally using sendmail
* instead of connecting to a SMTP-server.
*/
#global $useSendmail, $sendmail_path;
#$useSendmail = true;
#$sendmail_path = '/usr/sbin/sendmail';



Thanks in advance

Phil

toml
01-05-2004, 06:24 PM
I think you still need the $smtp_auth_mech = 'login'; part so it will authenticate with your SMTP server.

uk_joker2003
01-05-2004, 11:42 PM
ok i have added that but am getting the following error


Parse error: parse error in /var/www/html/squirrelmail-1.4.2/config/config.php on line 60

Below is line 58-61 any idea's?

global $domain;
$domain=$_SERVER['HTTP_HOST']; while (sizeof(explode('.', $domain)) > 2 {$domain = substr($domain, strpos($domain, '.') + 1);}
/* $domain = 'catzmail.com'; */

toml
01-06-2004, 07:01 AM
I don't see any thing on those lines, but it could be on a line above that. Usually if you forget to close a quote, brace or paren, it will tell you something similar.

uk_joker2003
01-06-2004, 07:35 AM
ok, i have now got rid of the errors but cant still not send mail via squirrelmail. However after more testing and research the following might help.

I can send and recieve from both popmail (outlook) and uebmiau. But cannot use IMAP (through outlook) and send email from squirrelmail.

Any other idea's or help?

Thanks in advance

Phil

uk_joker2003
01-06-2004, 07:49 AM
Originally posted by DirectAdmin Support
Hello,

Not too sure. Check the exim logs (/var/log/exim/*) and make sure that 127.0.01 is in the relay_hosts.

John

Does this help?

MAINLOG

2004-01-04 04:02:12 1Ad557-0008RM-MV <= root@server.catzmail.com U=root P=local S=841
2004-01-04 04:02:13 1Ad557-0008RM-MV User 0 set for local_delivery transport is on the never_users list
2004-01-04 04:02:13 1Ad557-0008RM-MV == root@server.catzmail.com R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list
2004-01-04 04:02:13 1Ad557-0008RM-MV ** root@server.catzmail.com: retry timeout exceeded
2004-01-04 04:02:13 1Ad55J-0008Vh-0M <= <> R=1Ad557-0008RM-MV U=mail P=local S=1729
2004-01-04 04:02:13 1Ad55J-0008Vh-0M User 0 set for local_delivery transport is on the never_users list
2004-01-04 04:02:13 1Ad55J-0008Vh-0M == root@server.catzmail.com R=localuser T=local_delivery defer (-29): User 0 set for local_delivery transport is on the never_users list

toml
01-06-2004, 09:03 AM
That is saying that "root" is in the never_users list in your /etc/exim.conf. I would suggest you try to send mail with a users account.

uk_joker2003
01-06-2004, 09:06 AM
i didnt send the email as root, it was sent as a user phil@catzmail.com

toml
01-06-2004, 10:30 AM
Actually looking at the log, it appears more like you are trying to send mail TO root, which because it is in the never_users list will not accept the email. Try sending mail to another account, for testing.

DirectAdmin Support
01-06-2004, 10:37 AM
Hello,

Easy fix for the root issue is to put a root forwarder int /etc/aliases:

root: admin

or something like that.

John

uk_joker2003
01-06-2004, 11:26 AM
Originally posted by DirectAdmin Support
Hello,

Easy fix for the root issue is to put a root forwarder int /etc/aliases:

root: admin

or something like that.

John

FANTASIC... What would i do without this forum..... I can now send from squirrelmail. However i still cannot get imap to work from outlook. Do i need to enable this or is it enabled from default?

DirectAdmin Support
01-07-2004, 01:48 PM
Hello,

If squirrelmail can use IMAP, but Outlook can't, it sounds to me like a firewall is blocking port 143. Check that your iptables is lettings port 143 through, or you can just type:

service iptables stop

to see if it's blocking the port.

John

ProWebUK
01-07-2004, 02:05 PM
Originally posted by DirectAdmin Support
Hello,

If squirrelmail can use IMAP, but Outlook can't, it sounds to me like a firewall is blocking port 143. Check that your iptables is lettings port 143 through, or you can just type:

service iptables stop

to see if it's blocking the port.

John

May want to flush your rules before doing that.... else you get that risk of being booted :D

Chris

uk_joker2003
01-09-2004, 04:55 AM
ok after further testing i still have this problem.

I can send email from uebmail to anywhere first time. However through squirrelmail i can only send to domain's that i have sent to before. If i am trying to send to a domain i have not sent to before i get the 550 error. However if i open up another ie window and log into ueimail and then send the email it's works first time, I am then able to send to that domain from squirrelmail.

It's like the domain has to be added before it can be sent.

Any idea's

Phil

DirectAdmin Support
01-09-2004, 11:05 AM
Hello,

Not too sure. If you want us to have a look, sent us your full server info (ip, root pass, admin pass, email account, email password) and a description of the problem.

John

johnallen
05-16-2004, 08:07 PM
Edit this file:

/var/www/html/squirrelmail/config/config.php


Change:

$smtp_auth_mech = 'none';


to show:

$smtp_auth_mech = 'login';

Lhadatt
01-13-2005, 01:14 AM
$domain=$_SERVER['HTTP_HOST'];
while (sizeof(explode('.', $domain)) > 2) {
$domain = substr($domain, strpos($domain, '.') + 1);
}
DirectAdmin Support:

Please integrate the above code from toml into the squirrelmail/config/config.php script for future versions of DirectAdmin. It seems to be a solution to the problem some of us have had with sending from Squirrelmail on my virtual domains. I'm really forced to wonder why this was not included with my new DA install, but no matter.

DirectAdmin Support
01-14-2005, 01:31 AM
Hello,

Thanks, I've added this gross little piece of perl in the squirrelmail.sh script to do it ;) (slightly obfuscated)perl -pi -e "s/\'example.com\';/\\$\_SERVER\[\'HTTP_HOST\'\];\nwhile \(sizeof\(explode\(\'\.\', \\$\domain\)\) \> 2) {\n\t\\$\domain = substr(\\$\domain, strpos\(\\$\domain, \'\.\'\) \+ 1\);\n\}/" /var/www/html/squirrelmail/config/config.php

Edit: there *are* backslashes in front of of the ' characters.. the forum just isn't showing them.

John