Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Qmail setup; Can send local not remote 1

Status
Not open for further replies.

cparks73

MIS
Jul 22, 2004
12
0
0
US
I am trying to set up qmail on Mandrake 10.1. I am familiar with Linux, not so much with email servers. I have a registered domain name and static IP. I used the lifewithqmail docs. Now I am at the testing phase. So far I can send local but not remote.

Any help or recommendations would be great.

Here is some output:

# echo to: admin | /var/qmail/bin/qmail-inject
Result in /var/log/syslog:
Nov 21 18:39:10 whipsaw qmail: 1101083950.735838 new msg 94
Nov 21 18:39:10 whipsaw qmail: 1101083950.735983 info msg 94: bytes 275 from <admin@mo-11-11-11-11.sta.sprint-hsd.net> qp 19959 uid 501
Nov 21 18:39:10 whipsaw qmail: 1101083950.747087 starting delivery 194: msg 94 to local admin@mo-11-11-11-11.sta.sprint-hsd.net
Nov 21 18:39:10 whipsaw qmail: 1101083950.747224 status: local 1/10 remote 0/20
Nov 21 18:39:10 whipsaw qmail: 1101083950.778825 delivery 194: success: did_1+0+0/
Nov 21 18:39:10 whipsaw qmail: 1101083950.778953 status: local 0/10 remote 0/20
Nov 21 18:39:10 whipsaw qmail: 1101083950.778986 end msg 94

# echo to: admin@mydomain.com | /var/qmail/bin/qmail-inject
Result in /var/log/syslog:
Nov 21 18:39:20 whipsaw qmail: 1101083960.185561 new msg 94
Nov 21 18:39:20 whipsaw qmail: 1101083960.185686 info msg 94: bytes 258 from <admin@mo-11-11-11-11.sta.sprint-hsd.net> qp 19965 uid 501
Nov 21 18:39:20 whipsaw qmail: 1101083960.195383 starting delivery 195: msg 94 to remote admin@mydomain.com
Nov 21 18:39:20 whipsaw qmail: 1101083960.195509 status: local 0/10 remote 1/20
Nov 21 18:39:20 whipsaw qmail: 1101083960.283395 delivery 195: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Nov 21 18:39:20 whipsaw qmail: 1101083960.283509 status: local 0/10 remote 0/20

# qmailctl stat
/service/qmail-send: up (pid 5432) 159640 seconds
/service/qmail-send/log: up (pid 5433) 159640 seconds
/service/qmail-smtpd: up (pid 5437) 159640 seconds
/service/qmail-smtpd/log: up (pid 5443) 159640 seconds
messages in queue: 14
messages in queue but not yet preprocessed: 0

# /var/qmail/bin/qmail-showctl
qmail home directory: /var/qmail.
user-ext delimiter: -.
paternalism (in decimal): 2.
silent concurrency limit: 120.
subdirectory split: 23.
user ids: 502, 503, 504, 0, 505, 506, 507, 508.
group ids: 502, 503.

badmailfrom: (Default.) Any MAIL FROM is allowed.

bouncefrom: (Default.) Bounce user name is MAILER-DAEMON.

bouncehost: (Default.) Bounce host name is mo-11-11-11-11.sta.sprint-hsd.net.

concurrencylocal: (Default.) Local concurrency is 10.

concurrencyremote: (Default.) Remote concurrency is 20.

databytes: (Default.) SMTP DATA limit is 0 bytes.

defaultdomain: Default domain name is sta.sprint-hsd.net.

defaulthost: (Default.) Default host name is mo-11-11-11-11.sta.sprint-hsd.net.

doublebouncehost: (Default.) 2B recipient host: mo-11-11-11-11.sta.sprint-hsd.net.

doublebounceto: (Default.) 2B recipient user: postmaster.

envnoathost: (Default.) Presumed domain name is mo-11-11-11-11.sta.sprint-hsd.net.

helohost: (Default.) SMTP client HELO host name is mo-11-11-11-11.sta.sprint-hsd.net.

idhost: (Default.) Message-ID host name is mo-11-11-11-11.sta.sprint-hsd.net.

localiphost: (Default.) Local IP address becomes mo-11-11-11-11.sta.sprint-hsd.net.

locals:
Messages for localhost are delivered locally.
Messages for mo-11-11-11-11.sta.sprint-hsd.net are delivered locally.

me: My name is mo-11-11-11-11.sta.sprint-hsd.net.

percenthack: (Default.) The percent hack is not allowed.

plusdomain: Plus domain name is sprint-hsd.net.

qmqpservers: (Default.) No QMQP servers.

queuelifetime: (Default.) Message lifetime in the queue is 604800 seconds.

rcpthosts:
SMTP clients may send messages to recipients at localhost.
SMTP clients may send messages to recipients at mo-11-11-11-11.sta.sprint-hsd.net.

morercpthosts: (Default.) No effect.

morercpthosts.cdb: (Default.) No effect.

smtpgreeting: (Default.) SMTP greeting: 220 mo-11-11-11-11.sta.sprint-hsd.net.

smtproutes: (Default.) No artificial SMTP routes.

timeoutconnect: (Default.) SMTP client connection timeout is 60 seconds.

timeoutremote: (Default.) SMTP client data timeout is 1200 seconds.

timeoutsmtpd: (Default.) SMTP server data timeout is 1200 seconds.

virtualdomains: (Default.) No virtual domains.

concurrencyincoming: I have no idea what this file does.

defaultdelivery: I have no idea what this file does.
 
Oh another thing I'm not sure about.

My MX Record.

My servers fully qualified domainname is: whipsaw.mydomain.com

My MX record with register.com

HostName: mydomain.com
Priority: Hi
MailServer: mail.mydomain.com

Not sure if this is right, or what it is supposed to be
 
I see some odd things:

Code:
defaulthost: (Default.) Default host name is mo-11-11-11-11.sta.sprint-hsd.net.

doublebouncehost: (Default.) 2B recipient host: mo-11-11-11-11.sta.sprint-hsd.net.

doublebounceto: (Default.) 2B recipient user: postmaster.

envnoathost: (Default.) Presumed domain name is mo-11-11-11-11.sta.sprint-hsd.net.

helohost: (Default.) SMTP client HELO host name is mo-11-11-11-11.sta.sprint-hsd.net.

idhost: (Default.) Message-ID host name is mo-11-11-11-11.sta.sprint-hsd.net.

localiphost: (Default.) Local IP address becomes mo-11-11-11-11.sta.sprint-hsd.net.


These should probably be your domain. You typically do not need to resolve back to your IP reverse DNS except in very rare circumstances.

And this is why your email is bouncing:

Code:
rcpthosts:
SMTP clients may send messages to recipients at localhost.
SMTP clients may send messages to recipients at mo-11-11-11-11.sta.sprint-hsd.net.

You are not allowing mail to be received on this mail server at your domain. You need to add your domain to the rcpthosts list.

You really should strike all configuration references to mo-11-11.... They aren't relevant. Your MX record uses your domain name, your control files should use it too.



Hosting Solutions for Home or Business.
 
Thanks for looking at this:

So I should change all the mo-11-11-11-11.sta.sprint-hsd.net to mydomain.com?

And how do I add mydomain.com to rcpthosts list?
 
vi /var/qmail/control/rcpthosts
then add mydomain.com to the the list
 
OK, I did this
./config-fast whipsaw.mydomain.com
which replaced all the mo-11-11-11-11.sta.sprint-hsd.net with whipsaw.mydomain.com.
It also put it in my rcpthost file.
But to no avail I still get:

# tail -10 /var/log/syslog
Nov 22 16:15:30 whipsaw qmail: 1101161730.320678 new msg 1166
Nov 22 16:15:30 whipsaw qmail: 1101161730.320812 info msg 1166: bytes 238 from <admin@whipsaw.mydomain.com> qp 1610 uid 501
Nov 22 16:15:30 whipsaw qmail: 1101161730.328081 starting delivery 1: msg 1166 to remote admin@mydomain.com
Nov 22 16:15:30 whipsaw qmail: 1101161730.328209 status: local 0/10 remote 1/20
Nov 22 16:15:30 whipsaw qmail: 1101161730.417405 delivery 1: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Nov 22 16:15:30 whipsaw qmail: 1101161730.417553 status: local 0/10 remote 0/20
Nov 22 16:17:01 whipsaw qmail: 1101161821.403957 starting delivery 2: msg 1161 to remote admin@mydomain.com
Nov 22 16:17:01 whipsaw qmail: 1101161821.404080 status: local 0/10 remote 1/20
Nov 22 16:17:01 whipsaw qmail: 1101161821.492896 delivery 2: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Nov 22 16:17:01 whipsaw qmail: 1101161821.493000 status: local 0/10 remote 0/20

Here is my new configuration:
# /var/qmail/bin/qmail-showctl
qmail home directory: /var/qmail.
user-ext delimiter: -.
paternalism (in decimal): 2.
silent concurrency limit: 120.
subdirectory split: 23.
user ids: 502, 503, 504, 0, 505, 506, 507, 508.
group ids: 502, 503.

badmailfrom: (Default.) Any MAIL FROM is allowed.

bouncefrom: (Default.) Bounce user name is MAILER-DAEMON.

bouncehost: (Default.) Bounce host name is whipsaw.mydomain.com.

concurrencylocal: (Default.) Local concurrency is 10.

concurrencyremote: (Default.) Remote concurrency is 20.

databytes: (Default.) SMTP DATA limit is 0 bytes.

defaultdomain: Default domain name is mydomain.com.

defaulthost: (Default.) Default host name is whipsaw.mydomain.com.

doublebouncehost: (Default.) 2B recipient host: whipsaw.mydomain.com.

doublebounceto: (Default.) 2B recipient user: postmaster.

envnoathost: (Default.) Presumed domain name is whipsaw.mydomain.com.

helohost: (Default.) SMTP client HELO host name is whipsaw.mydomain.com.

idhost: (Default.) Message-ID host name is whipsaw.mydomain.com.

localiphost: (Default.) Local IP address becomes whipsaw.mydomain.com.

locals:
Messages for localhost are delivered locally.
Messages for mo-69-69-115-137.sta.sprint-hsd.net are delivered locally.
Messages for whipsaw.mydomain.com are delivered locally.

me: My name is whipsaw.mydomain.com.

percenthack: (Default.) The percent hack is not allowed.

plusdomain: Plus domain name is mydomain.com.

qmqpservers: (Default.) No QMQP servers.

queuelifetime: (Default.) Message lifetime in the queue is 604800 seconds.

rcpthosts:
SMTP clients may send messages to recipients at localhost.
SMTP clients may send messages to recipients at whipsaw.mydomain.com.

morercpthosts: (Default.) No effect.

morercpthosts.cdb: (Default.) No effect.

smtpgreeting: (Default.) SMTP greeting: 220 whipsaw.mydomain.com.

smtproutes: (Default.) No artificial SMTP routes.

timeoutconnect: (Default.) SMTP client connection timeout is 60 seconds.

timeoutremote: (Default.) SMTP client data timeout is 1200 seconds.

timeoutsmtpd: (Default.) SMTP server data timeout is 1200 seconds.

virtualdomains: (Default.) No virtual domains.

concurrencyincoming: I have no idea what this file does.

defaultdelivery: I have no idea what this file does.


I also went to and here is the mail result:

Trying to connect to all mailservers:

whipsaw.mydomain.com. - 11.11.11.11 [Could not connect: Got an unknown RCPT TO response: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)
]

Any ideas?
 
UPDATE:
This is what I have been trying to send which resulted in error:
echo to: admin@mydomain.com | /var/qmail/bin/qmail-inject

Now I tried:
echo to: admin@whipsaw.mydomain.com | /var/qmail/bin/qmail-inject

And it worked.

How do I fix this??
 
To be blunt, you are screwing up the balance between your MX record, your domain and your hostname.

Think logically about this and it should hopefully become clear.

You tell the Internet, via your DNS MX record, that all mail for the domain "example.com" is handled via a hostname. Let's call your hostname "mail.example.com". And, of course, ultimately your DNS brings an IP to "mail.example.com".

NORMALLY (except for really complicated orgs) the MX record ONLY specifies the domain as "example.com" and does not prefix the "mail." or "whipsaw.". Your first mistake. Therefore, I would start by ensuring that your MX makes sense. If have the slightest concern in how this looks, try doing a linux command "dig MX tek-tips.com". The answer section is what will be presented to other email servers when they are trying to send mail to the domain "tek-tips.com". There is no allowance made for "whipsaw.tek-tips.com". OK? Unless you're building for a large, multi-national company I'd make sure this is fixed.

Now, with your MX directing mail destined for "bob@example.com" to hostname "mail.example.com" you need to train your qmail on host "mail.example.com" to accept mail for that domain. Again, I use the word DOMAIN and NOT HOSTNAME. Therefore, the 'rcpthosts' file should NOT contain a "whipsaw.example.com" but should contain "example.com" in its place (leaving localhost as-is).

Keep in mind that your outbound mailer has to follow the same rules as a foreign host emailer. You do the same lookups against DNS, find the MX record, resolve that MX hostname to an IP, try to queue the email inbound to that server and that server needs to accept email for that domain.

If you do these things, you will be able to send email to "admin@example.com" (not literally "example.com") and you will have disabled the nonsense around "whipsaw.example.com".

Final note, I have assumed that your efforts around whipsaw.example.com are steps taken in misconfiguration and are not indicative of your actual desire for your public email address to be "bob@whipsaw.example.com", which is nonsense IMHO.

Hosting Solutions for Home or Business.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top