# A sendmail problem

**URL:** <https://forums.rockylinux.org/t/a-sendmail-problem/6543>\
**Category:** Rocky Linux Help & Support\
**Created:** [July 11, 2022, 9:06pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543 "2022-07-11T21:06:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikheil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/mikheil/32/2054_2.png) [@Mikheil](https://forums.rockylinux.org/u/Mikheil)\
**Post date:** [July 11, 2022, 9:06pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/1 "2022-07-11T21:06:38Z")

</div>

I have two forums and I wanted to allow them to be able to contact users. I installed Sendmail. Nothing fancy it only SENDS mail. I have my regular mail server running on a different machine.

I aliased root@localhost to send mail to my external mail server. It works perfectly with the forums and it sends me the Logwatch every morning.

I have fail2ban working. It also works fine BUT…  
I cannot get it to send mail from fail2ban or from a command line like mailto=root@localhost or myname@myserver  
I set  
destemail=root@localhost  
sender=root@localhost  
sendername=Fail2Ban  
mta=sendmail (I’ve also tried mta and mail)  
action=%(action\_mwl)s

Everything works except the mail

Also, if I try to use mailto, that doesn’t work either.

I’m sure this is something I’m going to kick myself about, but I give up

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [July 11, 2022, 9:41pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/2 "2022-07-11T21:41:11Z")

</div>

Have you checked the maillog in /var/log, at the exact time of the failure?  
What exact command line did you use to test it?  
When you say “I set”, where did you set this?

---

<div class="post-metadata">

**Author:** ![Mikheil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/mikheil/32/2054_2.png) [@Mikheil](https://forums.rockylinux.org/u/Mikheil)\
**Post date:** [July 11, 2022, 10:16pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/3 "2022-07-11T22:16:01Z")

</div>

I set it in fail2ban. Mailog has many entries. I’m just off to bed. Will get back tomorow.

---

<div class="post-metadata">

**Author:** ![Mikheil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/mikheil/32/2054_2.png) [@Mikheil](https://forums.rockylinux.org/u/Mikheil)\
**Post date:** [July 12, 2022, 7:11am UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/4 "2022-07-12T07:11:21Z")

</div>

Jun 12 03:20:16 centos-73 sendmail[20697]: 25C1KG3Q020697: from=[root@centos-73.myDomain](mailto:root@centos-73.myDomain), size=1196, class=0, nrcpts=1, msgid=[202206120120.25C1KGHt020683@centos-73myDomain](mailto:202206120120.25C1KGHt020683@centos-73myDomain), proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]  
Jun 12 03:20:16 centos-73 sendmail[20696]: 25C1KGNS020696: from=[root@centos-73.myDomain](mailto:root@centos-73.myDomain), size=6829, class=0, nrcpts=1, msgid=[202206120120.25C1KG6o020685@centos-73myDomain](mailto:202206120120.25C1KG6o020685@centos-73myDomain), proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]  
Jun 12 03:20:16 centos-73 sendmail[20700]: 25C1KGFO020700: from=[root@centos-73.myDomain](mailto:root@centos-73.myDomain), size=16208, class=0, nrcpts=1, msgid=[202206120120.25C1KG6Y020689@centos-73myDomain](mailto:202206120120.25C1KG6Y020689@centos-73myDomain), proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]  
Jun 12 03:20:16 centos-73 sendmail[20698]: 25C1KGi6020698: from=[root@centos-73.myDomain](mailto:root@centos-73.myDomain), size=594, class=0, nrcpts=1, msgid=[202206120120.25C1KGvn020681@centos-73myDomain](mailto:202206120120.25C1KGvn020681@centos-73myDomain), proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]  
Jun 12 03:20:16 centos-73 sendmail[20683]: 25C1KGHt020683: to=myEmail address, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30868, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (25C1KG3Q020697 Message accepted for delivery)  
Jun 12 03:20:16 centos-73 sendmail[20685]: 25C1KG6o020685: to=myEmail address, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=36501, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (25C1KGNS020696 Message accepted for delivery)  
Jun 12 03:20:16 centos-73 sendmail[20689]: 25C1KG6Y020689: to=myEmail address, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=45880, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (25C1KGFO020700 Message accepted for delivery)  
Jun 12 03:20:16 centos-73 sendmail[20699]: 25C1KGfI020699:

But nothing gets delivered and the mailbox and the queue are empty!

---

<div class="post-metadata">

**Author:** ![Mikheil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/mikheil/32/2054_2.png) [@Mikheil](https://forums.rockylinux.org/u/Mikheil)\
**Post date:** [July 12, 2022, 3:47pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/5 "2022-07-12T15:47:30Z")

</div>

I’ve just noticed. I have jail.conf and jail.local.conf. I see references to jail.local but if I try to change the name from jail.local.conf to jail.local, fail2ban won’t start.

---

<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:** [July 13, 2022, 3:05pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/6 "2022-07-13T15:05:57Z")

</div>

Hi,

Have you seen the example provided by fail2ban:

[https://www.fail2ban.org/wiki/index.php/Sendmail](https://www.fail2ban.org/wiki/index.php/Sendmail)

Regards Tom.

---

<div class="post-metadata">

**Author:** ![Mikheil](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/mikheil/32/2054_2.png) [@Mikheil](https://forums.rockylinux.org/u/Mikheil)\
**Post date:** [July 13, 2022, 4:10pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/7 "2022-07-13T16:10:33Z")

</div>

I tried it but fail2ban doesn’t start. I got this:

Process: 14652 ExecStop=/usr/bin/fail2ban-client stop (code=exited, status=255)

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [July 13, 2022, 4:33pm UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/8 "2022-07-13T16:33:41Z")

</div>

You would need to look in /var/log/fail2ban.log for clues on why it errors out on restart.

Normally the preferred method from instructions I have read in the past related to fail2ban are:

```auto
cd /etc/fail2ban
cp jail.conf jail.local

```

all changes are then made to jail.local rather than jail.conf. But the logs should give a hint as to why it’s not starting after the changes have been made.

---

<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, 3:45am UTC](https://forums.rockylinux.org/t/a-sendmail-problem/6543/9 "2023-08-25T03:45:53Z")

</div>

Closed on August 25, 2023, 3:45am UTC


