Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Sendmail] Can't send mail to root@localhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
kgdrenefort
Apprentice
Apprentice


Joined: 19 Sep 2023
Posts: 297
Location: Somewhere in the 77

PostPosted: Sat Sep 28, 2024 10:26 am    Post subject: [Sendmail] Can't send mail to root@localhost Reply with quote

Hello,

For my project I need to be able to send locally an e-mail to root@localhost, or any Unix users I want.

It's on a Raspberry Pi 4 with Gentoo installed on it by the way.

Things to note: I had to install sendmail by adding this file: /etc/portage/package.accept_keyword/sendmail

Code:
<mail-mta/sendmail-9999 **
mail-filter/procmail ~arm64


Allowing me to install it, since there is no ARM64 ebuild.

Now it's installed.

I tried several things to run sendmail, but the best I could get for now is these mails kept in /var/spool/clientmqueue, I can see my previous tests :

Code:
localhost /var/spool # grep -rin "toto" *
clientmqueue/qf48RAxi2O1000483:22:H??sujet: toto
clientmqueue/qf48RB7jsO1000513:22:H??sujet: toto
clientmqueue/qf48SAC9O71013185:22:H??Subject: toto
clientmqueue/qf48SAI3Nm1013236:22:H??Subject: toto_1


Or other, here:

Code:
clientmqueue:
df48RAxi2O1000483  df48RB17Vu1000487  df48RB7jsO1000513  df48SAC9O71013185  qf48RB0bWM1000486  qf48RB4EAW1000504  qf48RBAeuX1000525
df48RB0bWM1000486  df48RB4EAW1000504  df48RBAeuX1000525  qf48RAxi2O1000483  qf48RB17Vu1000487  qf48RB7jsO1000513  qf48SAC9O71013185


Showing me, at least, it try.

I tried to send these by running this kind of command:

Testing if it could works, as root:
Code:
sendmail -bv
root@localhost... deliverable: mailer local, user root


Code:
echo "Subject: toto" | sendmail root@localhost


Etc.

So far, the best I get is to have these stuck in clientmqueue.

Later, I would need to be able to use sendmail with -t -i option from a php.ini file to finalize my PHP form script project, that would later use the proper ways to send e-mail across the network.

Any ideas or suggestion regarding this ?

Regards,
GASPARD DE RENEFORT Kévin
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3350

PostPosted: Sat Sep 28, 2024 1:36 pm    Post subject: Reply with quote

I don't use sendmail, but can you send mail to root without domain? Domain name is not required for local delivery.

/etc/aliases might be worth inspecting, there is no need to alter the default on most systems, but perhaps you'll get some hint from checking it out,
Also, how committed are you to sendmail? Asking just in case.
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
kgdrenefort
Apprentice
Apprentice


Joined: 19 Sep 2023
Posts: 297
Location: Somewhere in the 77

PostPosted: Sat Sep 28, 2024 1:46 pm    Post subject: Reply with quote

szatox wrote:
I don't use sendmail, but can you send mail to root without domain? Domain name is not required for local delivery.

/etc/aliases might be worth inspecting, there is no need to alter the default on most systems, but perhaps you'll get some hint from checking it out,
Also, how committed are you to sendmail? Asking just in case.


Thank for your answer, as the idea. Sadly it doesn't seems to help:

Code:
localhost /var/spool # grep -rin "toto3" *
clientmqueue/qf48SDfQS81013778:22:H??Subject: toto3


While sending as this:

(non-root user)
Code:
echo "Subject: toto3" | sendmail root


(as in root)
Code:
localhost /var/spool # echo "Subject: toto3" | sendmail root
localhost /var/spool # grep -rin "toto3" *
clientmqueue/qf48SDfQS81013778:22:H??Subject: toto3
clientmqueue/qf48SDhm0G1013782:22:H??Subject: toto3


About if I'm committed to sendmail: No, but it seems to be a simple and default way to do so, in my futur project it'll probably rely on a real SMTP server from an ESP I use.

Regards,
GASPARD DE RENEFORT Kévin
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3350

PostPosted: Sat Sep 28, 2024 2:46 pm    Post subject: Reply with quote

Well, sendmail certainly is quite old and established. This said, postfix too has matured a long time ago, and does the job pretty well. Local delivery should just work with default config.
You might give it a shot and see which one do you like more.

Either way, have you tried sending mail manually using e.g. netcat or telnet? Server might flat out tell you what's wrong during SMTP conversation.
What about logs? Is it trying to forward your local mail somewhere else? Does it need another MDA to finish the job?
Is a local delivery method defined in sendmail's config?
Are you able to send mail to other, remote servers?
_________________
Make Computing Fun Again
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum