# Sles11SP3  sendmail problem

**URL:** <https://forums.suse.com/t/sles11sp3-sendmail-problem/26682>\
**Category:** SLES Configure-Administer\
**Created:** [February 12, 2015, 12:57pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682 "2015-02-12T12:57:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 12, 2015, 12:57pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/1 "2015-02-12T12:57:15Z")

</div>

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](mailto:myadress@mydomain), delay=00:00:00, mailer=esmtp, pri=30508, dsn=4.4.43, stat=queued  
sendmail[595]: t1CAbNBj000595: to=[myadress@mydomain](mailto: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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 12, 2015, 1:13pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/2 "2015-02-12T13:13:27Z")

</div>

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? 😉

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

---

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 12, 2015, 1:24pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/3 "2015-02-12T13:24:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 12, 2015, 1:49pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/4 "2015-02-12T13:49:38Z")

</div>

[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](http://docstore.mik.ua/orelly/networking/sendmail/ch38_01.htm))

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 12, 2015, 2:08pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/5 "2015-02-12T14:08:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 12, 2015, 2:24pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/6 "2015-02-12T14:24:16Z")

</div>

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](http://relay.example.com)]

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

# [relay.example.com:26](http://relay.example.com:26) or [[relay.example.com](http://relay.example.com)]:26 to prevent MX lookups.[/QUOTE]

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 12, 2015, 2:27pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/7 "2015-02-12T14:27:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 12, 2015, 2:37pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/8 "2015-02-12T14:37:00Z")

</div>

> [@](#):
>
> 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.

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.

> [@](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 12, 2015, 2:55pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/9 "2015-02-12T14:55:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 17, 2015, 12:59pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/10 "2015-02-17T12:59:21Z")

</div>

Hallo Jens,

ich glaube wir kÃ¶nnten uns auch auf Deutsch unterhalten 🙂

Wo muss ich denn diese Eckigen Klammern angeben?

GrÃ¼Ãe  
Christian

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 17, 2015, 1:13pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/11 "2015-02-17T13:13:35Z")

</div>

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 🙂

[QUOTE=christianmolecki;26403]Wo muss ich denn diese Eckigen Klammern angeben?[/QUOTE]

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](http://relay.example.com)]

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

# [relay.example.com:26](http://relay.example.com:26) or [[relay.example.com](http://relay.example.com)]:26 to prevent MX lookups.

[/CODE][/QUOTE]

Regards,  
Jens

---

<div class="post-metadata">

**Author:** ![christianmolecki](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@christianmolecki](https://forums.suse.com/u/christianmolecki)\
**Post date:** [February 17, 2015, 1:24pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/12 "2015-02-17T13:24:07Z")

</div>

Hello Jens,

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

Unfortunatly the problem persists

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 17, 2015, 1:33pm UTC](https://forums.suse.com/t/sles11sp3-sendmail-problem/26682/13 "2015-02-17T13:33:17Z")

</div>

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
