View previous topic :: View next topic |
Author |
Message |
kgdrenefort Apprentice
Joined: 19 Sep 2023 Posts: 298 Location: Somewhere in the 77
|
Posted: Sat Sep 28, 2024 10:26 am Post subject: [Sendmail] Can't send mail to root@localhost |
|
|
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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3351
|
Posted: Sat Sep 28, 2024 1:36 pm Post subject: |
|
|
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 |
|
|
kgdrenefort Apprentice
Joined: 19 Sep 2023 Posts: 298 Location: Somewhere in the 77
|
Posted: Sat Sep 28, 2024 1:46 pm Post subject: |
|
|
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 |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3351
|
Posted: Sat Sep 28, 2024 2:46 pm Post subject: |
|
|
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 |
|
|
kgdrenefort Apprentice
Joined: 19 Sep 2023 Posts: 298 Location: Somewhere in the 77
|
Posted: Mon Sep 30, 2024 8:16 am Post subject: |
|
|
szatox wrote: | 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? |
For now I did not tried netcat or telnet. That could maybe leads me to what's not working yes, I would have to give it a try.
I do not see any logs about that, my system is supposed to use systemd default way.
About MDA I was thinking it was kind of useless since it's a simple local message.
I did not do any config for sendmail, so far as I remember, hopping it was more or less by default working for such task.
And no, I can't send mail anywhere, even locally it seems.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3351
|
Posted: Mon Sep 30, 2024 8:23 am Post subject: |
|
|
Quote: | About MDA I was thinking it was kind of useless since it's a simple local message. | Yeah, I'd think that too, but when things don't work as expected it's time to question everything.
Unfortunately we don't have a lot to work with right now _________________ Make Computing Fun Again |
|
Back to top |
|
|
|
|
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
|
|