Sles11SP3 sendmail problem

Hello,

I have following problem with sendmail.
If I try to send a mail, sendmail uses root@localhost as relay and not the specified outgoing mailserver.

Logentry:

[QUOTE]sendmail[569]: starting deamon (8.14.3): SMTP+queueing@00:30:00
sendmail-client [580]: starting deamon (8.14.3): persistent-queueing@00:01:00
sendmail[595]: t1CAbNBj000595: from=root, size=241, class=0, nrcpts=1, msgid=<201502121037.t1CAbNBj000595@testhost.workgroup, relay=root@localhost
sendmail[599]: t1CAbNqp000599: from=root@testhost.workgroup, size=508, class=0, nrcpts=1, msgid=>201502121037.t1CAbNqp000599@testhost.workgroup, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
sendmail[599]: t1CAbNqp000599: to=myadress@mydomain, delay=00:00:00, mailer=esmtp, pri=30508, dsn=4.4.43, stat=queued
sendmail[595]: t1CAbNBj000595: to=myadress@mydomain, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30241, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=SENT (t1CAbNqp000599 Message accepted for delivery)[/QUOTE]

How can I fix this problem?

Best Regards,
Chris.

Hi Chris,

If I try to send a mail, sendmail uses root@localhost as relay and not the specified outgoing mailserver.
How can I fix this problem?

by fixing the configuration? :wink:

This somehow sounds like a fresh install to me - any reason not to use Postfix instead of sendmail? You’ll find more people familiar with the former nowadays, not many sendmail specialists around anymore.

If I try to send a mail, sendmail uses root@localhost as relay and not the specified outgoing mailserver.

I do read the log a tiny bit different: sendmail tries to forward mail for “myadress@mydomain” to the MTA at 127.0.0.1 (localhost).

Without further details, my guess is that either sendmail has been configured to route to itself or your DNS has an improper MX record for mydomain. How familiar are you with sendmail and Internet mail setup?

Regards,
Jens

Hi Jens,

this is a fresh sendmail installation. I only configured the outgoing mail server via YAST.
The server has no connection to a DNS server and no further routes than the default route

Chris.

[QUOTE=christianmolecki;26330]Hi Jens,

this is a fresh sendmail installation.[/QUOTE]

Is “sendmail” a given, or are you free to switch to Postfix?

[QUOTE=christianmolecki;26330I only configured the outgoing mail server via YAST.
The server has no connection to a DNS server and no further routes than the default route[/QUOTE]

IP routes are not what I’m thinking of - it’s the mail routing inside sendmail (the “rules”) that I’m after. You ought to try to test-drive the sendmail rules (see i.e. http://docstore.mik.ua/orelly/networking/sendmail/ch38_01.htm)

Regards,
Jens

sendmail is not given.

Meanwhile I installed postfix and configured the outgoing mailserver via yast.
Now I get the error: Host or domain name not found. Name service error for name= type=MX: Host not found, try again)

The server has no DNS-servers but is in a (fake-)domain to get a FQDN.

Hi Chris,

[QUOTE=christianmolecki;26332]Meanwhile I installed postfix and configured the outgoing mailserver via yast.
Now I get the error: Host or domain name not found. Name service error for name= type=MX: Host not found, try again)

The server has no DNS-servers but is in a (fake-)domain to get a FQDN.[/QUOTE]

I take it that your new server is not to receive any email? That’s what would be called a “null client”, which forwards all mail to a more knowledgeable MTA. You can set POSTFIX_NULLCLIENT=“yes” /etc/sysconfig/postfix and run /usr/sbin/config.postfix to adjust the configuration.

Else (if you don’t want all mails to be sent to another MTA) you might have to adjust the RELAY_HOST. From /etc/sysconfig/postfix:

[QUOTE]## Path: Network/Mail/Postfix

Description: Basic configuration of the postfix MTA

Type: string

Default: “”

Config: postfix

Should we use a mailrelay?

NOTE: ALL mail that is not considered to be my destination

(POSTFIX_LOCALDOMAINS), will be sent to this host.

If this host is not your MX, then you have to use [square brackets]

around the hostname, e.g. [relay.example.com]

You may also specify an alternate port number, e.g.

relay.example.com:26 or [relay.example.com]:26 to prevent MX lookups.[/QUOTE]

Regards,
Jens

Hi Chris,

that info was mis-leading: If you actually have no DNS at all (not just no DNS setup for the domain of the server in question) or your relay server (which you already configured) has no MX record, you ought to use the “[…]” syntax at all times, no matter if you’re running the server as a null client or not.

Regards,
Jens

Your assumption is correct.
I made the changes. But /usr/sbin/config.postfix is not available. So I run /etc/init.d/postfix restart
Unfortunately it didn’t change anything.

Nullclient is the right thing for us.

Hi Chris,

[QUOTE=christianmolecki;26337]Your assumption is correct.
I made the changes. But /usr/sbin/config.postfix is not available. So I run /etc/init.d/postfix restart
Unfortunately it didn’t change anything.[/QUOTE]

My fault - it’s /usr/sbin/SuSEconfig.postfix

[QUOTE=christianmolecki;26337]

Else (if you don’t want all mails to be sent to another MTA) you might have to adjust the RELAY_HOST. From /etc/sysconfig/postfix:
Nullclient is the right thing for us.[/QUOTE]

Please see my other message concerning DNS / MX records: Using the “[…]” syntax you tell Postfix not to try to obtain the actual MTA’s address by looking for an MX record in DNS.

Regards,
Jens

Hallo Jens,

ich glaube wir könnten uns auch auf Deutsch unterhalten :slight_smile:

Wo muss ich denn diese Eckigen Klammern angeben?

Grüße
Christian

Hi Christian,

[QUOTE=christianmolecki;26403]Hallo Jens,

ich glaube wir könnten uns auch auf Deutsch unterhalten :)[/QUOTE]

natürlich könnten wir das, but for the sake of other international readers of this forum/thread, I suggest not to switch to German :slight_smile:

You’d need to use the “[…]” syntax when specifying a host name that has no DNS MX record. In your specific case, that’d probably be RELAY_HOST in /etc/sysconfig/postfix (or the corresponding value in YaST) as quoted in my earlier message:

[QUOTE=jmozdzen;26335]

[CODE]## Path: Network/Mail/Postfix

Description: Basic configuration of the postfix MTA

Type: string

Default: “”

Config: postfix

Should we use a mailrelay?

NOTE: ALL mail that is not considered to be my destination

(POSTFIX_LOCALDOMAINS), will be sent to this host.

If this host is not your MX, then you have to use [square brackets]

around the hostname, e.g. [relay.example.com]

You may also specify an alternate port number, e.g.

relay.example.com:26 or [relay.example.com]:26 to prevent MX lookups.

[/CODE][/QUOTE]

Regards,
Jens

Hello Jens,

I made following entry in the config: POSTFIX_RELAYHOST="[IP-of-Mailserver]"

Unfortunatly the problem persists

Hi Christian,

[QUOTE=christianmolecki;26405]Hello Jens,

I made following entry in the config: POSTFIX_RELAYHOST="[IP-of-Mailserver]"

Unfortunatly the problem persists[/QUOTE]

did you re-run “/usr/sbin/SuSEconfig.postfix”? It then might be worth to share the contents of “/etc/postfix/main.cf” plus current syslog entries for a test mail.

Regards,
Jens