# Sendmail is running but not sending

**URL:** <https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438>\
**Category:** Rocky Linux Help & Support\
**Created:** [November 1, 2021, 10:12pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438 "2021-11-01T22:12:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 1, 2021, 10:12pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/1 "2021-11-01T22:12:03Z")

</div>

I configured sendmail in Rocky on my VirtualBox machine, just as on my CentOS 7 physical box.

Sendmail on the virtualbox machine will not send emails. Before I stay up til 2am again, is this because of virtualbox? The last entry in the maillog states service not available, but when I check sendmail service, it is running.

> Nov 1 11:48:27 finaidrocky sendmail[4215]: 1A1ImRU0004215: from=marc, size=13, class=0, nrcpts=1, msgid=[202111011848.1A1ImRU0004215@finaidrocky.finaid.wwu.edu](mailto:202111011848.1A1ImRU0004215@finaidrocky.finaid.wwu.edu), relay=root@localhost  
> Nov 1 11:48:28 finaidrocky sendmail[4215]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1.3, verify=FAIL, cipher=TLS\_AES\_256\_GCM\_SHA384, bits=256/256  
> Nov 1 11:48:28 finaidrocky sendmail[4216]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1.3, verify=NOT, cipher=TLS\_AES\_256\_GCM\_SHA384, bits=256/256  
> Nov 1 11:48:28 finaidrocky sendmail[4216]: 1A1ImRAh004216: from=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu), size=321, class=0, nrcpts=1, msgid=[202111011848.1A1ImRU0004215@finaidrocky.finaid.wwu.edu](mailto:202111011848.1A1ImRU0004215@finaidrocky.finaid.wwu.edu), proto=ESMTPS, daemon=MTA, relay=localhost [127.0.0.1]  
> Nov 1 11:48:28 finaidrocky sendmail[4215]: 1A1ImRU0004215: to=frommm@wwu.edu, ctladdr=marc (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30013, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (1A1ImRAh004216 Message accepted for delivery)  
> Nov 1 11:48:28 finaidrocky sendmail[4218]: 1A1ImRAh004216: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120321, relay=smtp.wwu.edu [140.160.248.194], dsn=4.0.0, stat=Deferred: 421 4.3.2 Service not available

> [root@finaidrocky sbin]# systemctl status sendmail  
> ● sendmail.service - Sendmail Mail Transport Agent  
> Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor preset: disabled)  
> Active: active (running) since Mon 2021-11-01 14:37:50 PDT; 31min ago  
> Process: 2994 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL\_OPTS $SENDMAIL\_OPTARG (code=exited, status=0/SUCCESS)  
> Process: 2989 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)  
> Process: 2988 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)  
> Main PID: 2996 (sendmail)  
> Tasks: 1 (limit: 4826)  
> Memory: 3.5M  
> CGroup: /system.slice/sendmail.service  
> └─2996 sendmail: accepting connections
> 
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1KmXD1002311: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1KV7BI003125: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1IKXrj003283: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1I1R0u002994: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1HsoYi002866: to=[marc.fromm@wwu.edu](mailto:marc.fromm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (10\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1IPZG0003361: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:37:50 finaidrocky.finaid.wwu.edu sendmail[2997]: 1A1ImRAh004216: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), ctladdr=[marc@finaidrocky.finaid.wwu.edu](mailto:marc@finaidrocky.finaid.wwu.edu) (1000/1\>  
> Nov 01 14:39:02 finaidrocky.finaid.wwu.edu sendmail[3019]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1.3, verify=NOT, cipher=TLS\_\>  
> Nov 01 14:39:02 finaidrocky.finaid.wwu.edu sendmail[3019]: 1A1Ld26q003019: from=[financialaid@wwu.edu](mailto:financialaid@wwu.edu), size=923, class=0, nrcpts=1, msgid=\<20211\>  
> Nov 01 14:39:02 finaidrocky.finaid.wwu.edu sendmail[3021]: 1A1Ld26q003019: to=[frommm@wwu.edu](mailto:frommm@wwu.edu), delay=00:00:00, xdelay=00:00:00, mailer=relay, pr\>

---

<div class="post-metadata">

**Author:** ![tjdoyle](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tjdoyle/32/500_2.png) [@tjdoyle](https://forums.rockylinux.org/u/tjdoyle)\
**Post date:** [November 1, 2021, 11:13pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/2 "2021-11-01T23:13:14Z")

</div>

Hi,

To me it looks like it can’t access the relay server (smtp.wwu.edu)

I’ve checked that host with:

[https://www.yougetsignal.com/tools/open-ports/](https://www.yougetsignal.com/tools/open-ports/)

Looks like smtp ports are closed (25, 465 & 587). Is this a private relay server? If not I would double check your sendmail config.

Regards Tom.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 2, 2021, 12:46am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/3 "2021-11-02T00:46:01Z")

</div>

@tjdoyle it’s at the university. On my centos7 box I don’t recall configuring any ports for smtp. Anyway to check if VirtualBox is blocking sendmail?

---

<div class="post-metadata">

**Author:** ![tjdoyle](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tjdoyle/32/500_2.png) [@tjdoyle](https://forums.rockylinux.org/u/tjdoyle)\
**Post date:** [November 2, 2021, 8:24am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/4 "2021-11-02T08:24:32Z")

</div>

Hi,

How is virtualbox configured for the network?

Thanks Tom.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 2, 2021, 3:15pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/5 "2021-11-02T15:15:55Z")

</div>

@tjdoyle I had to use bridge adapter to get ssh to work.  
 ![Capture](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/2X/b/b9d9e125b65667b7422386621162356e1654fa3c.png)

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 2, 2021, 6:39pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/6 "2021-11-02T18:39:11Z")

</div>

@whichiso Is the CentOS box behind the same router as your VirtualBox? This is old-school, and may require you to install `telnet` but try to telnet from both machines to the relay (either the IP or the hostname) and try the ports normally open for email. Most relays only allow trusted hosts to relay through them:

```auto
telnet 140.160.248.194 25 (for port 25) #or specify 587, or 465
Trying 140.160.248.194...
Connected to smtp.wwu.edu .
Escape character is '^]'.
220 smtp wwu.edu ESMTP

```

That shows a successful connection. If you get that on the CentOS machine but not on the VirtualBox machine, AND they are both using the same router for outbound, then there is _probably_ something wrong with the VirtualBox setup, though from my vantage point, it looks as if the mail server simply is refusing your connection.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 2, 2021, 7:55pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/7 "2021-11-02T19:55:45Z")

</div>

@sspencerwire I installed Rocky on real hardware and sendmail worked fine. VB is what’s giving me all the headaches.  
I ran telnet on both VB and real box for curiosity.  
Real Box

> telnet smtp.wwu.edu 25  
> Trying 140.160.248.194…  
> Connected to smtp.wwu.edu.

> telnet smtp.wwu.edu 25  
> Trying 140.160.248.194…  
> Connected to smtp.wwu.edu.  
> Escape character is ‘^]’.  
> 421 4.3.2 Service not available  
> Connection closed by foreign host.

---

<div class="post-metadata">

**Author:** ![tjdoyle](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/tjdoyle/32/500_2.png) [@tjdoyle](https://forums.rockylinux.org/u/tjdoyle)\
**Post date:** [November 2, 2021, 8:10pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/8 "2021-11-02T20:10:41Z")

</div>

Hi,

So telnet works on both?

What is the host machine virtual box is running on?

Thanks Tom.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 3, 2021, 3:05am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/9 "2021-11-03T03:05:22Z")

</div>

@tjdoyle the telnet only works on the real hardware, not on the VB machine. the VB is running on a windows 10 machine on same network as the real hardware Rocky machine.

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 3, 2021, 3:09am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/10 "2021-11-03T03:09:45Z")

</div>

@whichiso which is odd, because this says that telnet connects to both and then the service (the mail server you’re connecting to) is bouncing the connection:

```auto
Connected to smtp.wwu.edu.
Escape character is ‘^]’.
421 4.3.2 Service not available
Connection closed by foreign host.

```

I’m wondering if it can’t establish a reverse connection to your VirtualBox container through the Windows hardware. (proxy block, or some other firewall blocking??)

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 3, 2021, 3:28am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/11 "2021-11-03T03:28:14Z")

</div>

@whichiso, I’m trying to remember everything I’ve forgotten about sendmail. It’s been a while since I’ve used it in production. Try this: can you (from your CentOS install) telnet to sendmail running on your VirtualBox? I’m going to guess that you cannot. If not, try messing with the Windows firewall settings to open port 25 through the bridged network. (you can use port 587 if you want, too, but to me 25 will give you the results you are looking for) If no connection from CentOS, see if the mail logs show you any additional information on the CentOS machine. The mail server you are connecting to needs to be able to respond back to you, and if it can’t, the connection will end there.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 3, 2021, 3:38pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/12 "2021-11-03T15:38:37Z")

</div>

@sspencerwire I tried creating an inbound rule in windows fire wall for port 25 and port forwarding in a NAT adapter in VB network settings, but SMTP still doesn’t work. I had to use a second adapter in VB for the NAT, since Bridge adapter port forwarding is greyed out.

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 3, 2021, 5:28pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/13 "2021-11-03T17:28:01Z")

</div>

@whichiso Can you temp-disable the firewall on the Windows box completely and then test from CentOS box to the VirtualBox IP? I’m sure Windows doesn’t give you any logs to look at (not a Windows user for at least 15 years). Even with the firewall disabled, there’s a chance that this traffic isn’t getting into the Windows machine at all, but it would be worth a try.

---

<div class="post-metadata">

**Author:** ![synack2](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/synack2/32/1349_2.png) [@synack2](https://forums.rockylinux.org/u/synack2)\
**Post date:** [November 3, 2021, 8:53pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/14 "2021-11-03T20:53:46Z")

</div>

My guess is that it is working, but the receiving server is denying your request to relay/accept the mail. It isn’t a firewall issue, or at least not one that telnetting the server will help you fix, because you are sending it outbound from the server. Not going into the server. Many mail servers won’t recognize your request unless your reverse lookup points to and IP that is also registered to an MX record for your domain that you are sending from.

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 3, 2021, 10:03pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/15 "2021-11-03T22:03:58Z")

</div>

@sspencerwire and @synack2 I’ll need to revisit this when I can. It would be nice to get virtualbox Rocky to send mail, but at least it’s working on real hardware.

@synack2 since I’m using a valid static ip address on the VB Rocky, just like those on the real hardware, I would think it would be in the domain.

---

<div class="post-metadata">

**Author:** ![synack2](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/synack2/32/1349_2.png) [@synack2](https://forums.rockylinux.org/u/synack2)\
**Post date:** [November 4, 2021, 12:45am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/16 "2021-11-04T00:45:49Z")

</div>

I am going to make some assumptions, tell me if I am wrong on any of them.

1. You work at a company or organization that has firewall (We will say Cisco, but any enterprise grade firewall will do the same) and multiple outside static IP addresses

2. You have port 25 mapped in that firewall to your real mail server (or onsite spam filtering device) so it can receive mail.

3. You have your normal traffic NAT’d out another outside IP address (Cisco calls this traffic “overloaded” on the outside interface IP address)

4. When this is the case, when your actual mail server is talking to other mail servers, the router will look in its NAT table and see that a particular IP address has a inbound port mapping. It will then NAT or “overload” all of its outbound traffic over that IP address.

5. When your Virtual server goes to hit the outside world, it is going out the interface IP address where the general web traffic goes, not the servers mapped outside IP address.

6. The remote server does a reverse lookup on that IP address and verifies that is resolves to an A record that matches a MX record for you DNS Domain Name.

For example on your real server 98.72.12.2 ----\> Reverses to → [mail.company.com](http://mail.company.com) —\> MX Lookup for [comapny.com](http://comapny.com) → returns two records [mail.company.com](http://mail.company.com) and [mail2.company.com](http://mail2.company.com) → IT allows the connection.

On your new server → 98.72.12.1 – Reverses to – [someisp.com](http://someisp.com) – MX Lookup → [mail.company.com](http://mail.company.com) [mail2.company.com](http://mail2.company.com) – doesn’t match → Drops Connection

Reverse Pointer records have to be setup by your ISP, but the MX and A records are setup on your DNS name by you.

---

<div class="post-metadata">

**Author:** ![synack2](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/synack2/32/1349_2.png) [@synack2](https://forums.rockylinux.org/u/synack2)\
**Post date:** [November 4, 2021, 12:56am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/17 "2021-11-04T00:56:26Z")

</div>

It actually looks like your current record is set to [wwu-edu.mail.protection.outlook.com](http://wwu-edu.mail.protection.outlook.com)  
So you must be relaying all of your outbound mail through them as well

Your firewall is probably configure to only accept inbound port 25 connections from the servers at [outlook.com](http://outlook.com)

[tom@localhost ~]$ dig mx wwu.edu

; \<\<\>\> DiG 9.11.26-RedHat-9.11.26-6.el8 \<\<\>\> mx wwu.edu  
;; global options: +cmd  
;; Got answer:  
;; -\>\>HEADER\<\<- opcode: QUERY, status: NOERROR, id: 52381  
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:  
; EDNS: version: 0, flags:; udp: 512  
;; QUESTION SECTION:  
;wwu.edu. IN MX

;; ANSWER SECTION:  
wwu.edu. 20839 IN MX 10 [wwu-edu.mail.protection.outlook.com](http://wwu-edu.mail.protection.outlook.com).

;; Query time: 25 msec  
;; SERVER: 8.8.8.8#53(8.8.8.8)  
;; WHEN: Wed Nov 03 20:52:50 EDT 2021  
;; MSG SIZE rcvd: 87

[tom@localhost ~]$

---

<div class="post-metadata">

**Author:** ![whichiso](https://avatars.discourse-cdn.com/v4/letter/w/838e76/32.png) [@whichiso](https://forums.rockylinux.org/u/whichiso)\
**Post date:** [November 4, 2021, 1:37am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/18 "2021-11-04T01:37:52Z")

</div>

> [@synack2](#):
>
> On your new server → 98.72.12.1 – Reverses to – [someisp.com](http://someisp.com) – MX Lookup → [mail.company.com](http://mail.company.com) [mail2.company.com](http://mail2.company.com) – doesn’t match → Drops Connection

If I understand all your insights, the VB Rocky contacts the mail server, but when the mail server replies back, it’s actually replying to the PC running the VB Rocky.

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [November 5, 2021, 3:12pm UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/19 "2021-11-05T15:12:05Z")

</div>

@synack2 @whichiso, I made a slightly different assumption. My assumption was that since your CentOS hardware (which I assume is behind the same firewall, ISP, etc.) is allowed, that **that** IP address was allowed by the receiving mail server and that regardless of the IP you have set on your VB machine, that the IP advertised to the world is the same and allowed, that the problem would be in return traffic to your VB machine. That may be a wrong assumption. I’m totally aware of the requirements that most receiving email servers have for propper reverse IP and just as importantly, DNS TTL, but figured that this was out of play, as the CentOS box was working as expected. **shrugs** 🙂

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 4:02am UTC](https://forums.rockylinux.org/t/sendmail-is-running-but-not-sending/4438/20 "2023-08-25T04:02:22Z")

</div>


