LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-31-2005, 07:53 AM   #1
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
sendmail > bad address syntax


Hi,

Google isn't showing much help, and i couldn't find topics in LQ, i hope i can get help here..

Sendmail afaik works, and i can send mail from my system to an externam email properly. But when i try to reply from the external email back to root@xushi.co.uk, i get this error,

Code:
Final-Recipient: rfc822; root@212.158.224.166
Original-Recipient: rfc822; root@xushi.co.uk
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; bad address syntax: "root@212.158.224.166"
I wonder what's wrong, and if there are infact threads that solved this problem, sorry for not finding them..

Thanks
 
Old 03-31-2005, 08:21 AM   #2
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Well... it could be rejecting the root username, but I don't think so, since root is explicit in the default slack sendmail configuration. My guess is that it doesn't like the IP address. I tried sending one to my computer by IP address, and it bounced saying that it was an unknown host.

That IP address resolves to: host-212-158-224-166.bulldogdsl.com. You could try sending the mail to root@host-212-158-224-166.bulldogdsl.com and it should work properly.

If that's a static IP address, the registration looks a little weird. Not impossible, though. Since you own xushi.co.uk, you could simply throw up a subdomain on xushi.co.uk for that computer. Note that their sendmail has to be configured to accept for that domain name, otherwise you'll get a 550 Relaying Denied.

The error you're seeing, BTW, is generated by Postfix, not Sendmail. Sendmail's error on that type looks like this:

Code:
The original message was received at Thu, 31 Mar 2005 09:19:13 -0500
from [192.168.X.X]

   ----- The following addresses had permanent fatal errors -----
<rob@209.217.122.35>
    (reason: 550 Host unknown)

   ----- Transcript of session follows -----
550 5.1.2 <rob@209.217.122.35>... Host unknown (Name server: 209.217.122.35: host not found)
 
Old 03-31-2005, 10:17 AM   #3
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Thanks killerbob,

Yes i have a static ip address, 212.158.224.166, and i remember back in slack 9.0 and 9.1 it used to work by just sending emails to user@212.158.224.166.

As for the 550 Relaying Denied., yes, i was getting that error for quite a while. To solve the problem, i decided to try out the sendmail.cf which comes with ClamAV. The message is gone, but i'm getting the one i talked about above.

And btw, i just tried sending an email to root@host-212-158-224-166.bulldogdsl.com, and i'm getting the same 550 Relaying Denied error.

On a side note, now that you've mentioned it, i have virtual hosts on my computer, which are xushi.co.uk and kolba.co.uk. I didn't know that you had to configure sendmail to accept for domain names. Maby this is my problem here.. If so, do you know where i can allow it to?


EDIT:
========
adding host-212-158-224-166.bulldogdsl.com to /etc/mail/local-host-names solved the problem, though i'm still not sure why the ip address doesn't work...

EDIT 2:
Thanks, i guess that solved the problem.. i'll just stick to host-212-158-224-166.bulldogdsl.com. If it works.. i ain't complaining

Last edited by xushi; 03-31-2005 at 10:51 AM.
 
Old 03-31-2005, 11:53 AM   #4
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Quote:
As for the 550 Relaying Denied., yes, i was getting that error for quite a while. To solve the problem, i decided to try out the sendmail.cf which comes with ClamAV. The message is gone, but i'm getting the one i talked about above.
Glad it's working, but from a security standpoint, you should go back to the original sendmail.cf. The *only* way that you can enable relaying by changing sendmail.cf is to allow relaying for all hosts. In the current sendmail (8.13.4, but Slack ships with 8.13.3 which is the same), which hosts are allowed to relay is handled by /etc/mail/access.db. Just change /etc/mail/access and run make to compile the database. Then just restart sendmail to reload it.

Mine looks like this:
Code:
192.168.X.1    OK
192.168.X      RELAY
The .1 set to OK means that it'll allow remote connections from .1. That's there to deny relaying from my gateway box. The 192.168.X is to allow all computers on my specific subnet to relay.


HTH.
 
Old 03-31-2005, 12:41 PM   #5
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
So is 192.168.0.1 your gateway?

And if i do so, will i still be able to connect through tbird from outside my network to read/send emails ? (using my username and password ofcourse).

I think i need to read a bit more about sendmail and relaying. So far the only two softwares i still occasionaly have problems with are Sendmail and mysql, coz they're not really my field, or i dont put as much attention to them as i would for kernel compiling, etc...
 
Old 03-31-2005, 12:48 PM   #6
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Quote:
So is 192.168.0.1 your gateway?
Different subnet, but basically, yes. .X.1 is my gateway. My server is operating behind a firewall, and I'm forwarding ports 25, 80, and 443 to the server, *only*. The other services are for the private network, only.

Quote:
And if i do so, will i still be able to connect through tbird from outside my network to read/send emails ? (using my username and password ofcourse).
Nope. That's the idea. Keep in mind that if you can do anything remotely through your computer, so can somebody else. Being able to read mails isn't so important, but having an open SMTP relay is, well, kinda stupid. Nothing personal, but it's a great way to get yourself in trouble once some spammer or virus writer notices it.

If you need to be able to remotely send/receive e-mail, you can read some howto's that explain setting up Cyrus-SASL with SMTP-authentication, or you can do what I did when I decided that was too much work: set up webmail access. Supposedly it's pretty easy to set up SMTP authentication, but I'm lazy and get pissy when things don't work right the first time.

I've got webmail through HTTPS on my server, and I use that to check my mail from abroad. You don't need to pipe it through HTTPS, but I did so for security reasons.

Last edited by killerbob; 03-31-2005 at 12:49 PM.
 
Old 03-31-2005, 01:02 PM   #7
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Original Poster
Rep: Reputation: 45
Ah.. I didn't think i'd have an open relay if i used IMAP with username/password. In that case i'll disable my mail server for now..

I know what you mean and I do have alot of work nowadays (final year, dissertation, projects, etc...), and knowing how long it takes to do even something simple in linux when you don't have the time, i guess i'll just leave it for now, stick to the settings you recommended, and just stick to pine over ssh. But if you know of any good tutorials out there, please let me know (it would help the thread too).

I tried configuring HTTPS at one time, but it got very problematic when i started using virtual hosts, so, again, i skipped it.

When i do get the chance, i'll write up a quick SBS tutorial on how to do the whole lot.

Again, thanks for your help killerbob.
 
Old 03-31-2005, 01:42 PM   #8
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Quote:
Ah.. I didn't think i'd have an open relay if i used IMAP with username/password. In that case i'll disable my mail server for now..
The IMAP itself won't allow an open relay. The SMTP will if it isn't authenticated, irregardless if you're connecting via IMAP first. Unless you explicitly tell it to behave that way, Sendmail doesn't give a rat's patookus what other servers you're connecting to, and how you authenticate with them.

Quote:
I know what you mean and I do have alot of work nowadays (final year, dissertation, projects, etc...), and knowing how long it takes to do even something simple in linux when you don't have the time, i guess i'll just leave it for now, stick to the settings you recommended, and just stick to pine over ssh. But if you know of any good tutorials out there, please let me know (it would help the thread too).
Seriously? IlohaMail. http://ilohamail.org/main.php If you've got PHP installed, you can use IlohaMail. The programmer (Ryo Chijiiwa) wrote his own library for PHP, because he didn't really like how PEAR handled mail, and because a lot of installations don't have support for mail. Solution: write your own SMTP and IMAP/POP3 libraries using direct socket connections.

It's actually really well implemented, and for installation, it's just a case of unzipping it and creating a symlink to the source directory. For a basic installation, that's it. You can also modify the config files to specify the server names, etc, which I did. But basically, unzip, symlink, and you're up and running. I've never had a problem with security (but I'm also running it through HTTPS instead of straight HTTP. Before I got mod_ssl working right, though, I was connecting to it through unencrypted http, and it worked fine.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mii-tool Bad Address pierre31 Linux - Networking 0 02-26-2005 06:48 AM
Sendmail - Check for Bad From Address? maxnix Linux - Security 3 02-15-2004 10:55 AM
A Simple MySQL Query Question (I have Bad Syntax) bpk General 1 12-02-2003 09:04 PM
/dev/tux/backup/login: Bad address ron9999 Linux - General 0 09-30-2003 04:03 AM
address match list syntax for bind dguy Linux - Networking 2 07-16-2002 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration