Open cnst opened 3 years ago
+1. Any kind of MTA would be very useful in Termux, because of its queue processing feature & retrying delivery logic.
Could it be that you are trying to open a tcp port below 1024 for SMTP, this would require your android to be rooted. Try testing with normal linux or raspberrypi.org
Could it be that you are trying to open a tcp port below 1024 for SMTP
Ofc, it is not the case. He mentioned the situation when outgoing emails can't be delivered because of
no network connectivity.
E.g. in airplane mode, or no signal.
Thing to note in current state as of my post; mutt, mailtuils and fetchmail exist. procmail or maildrop is missing.
I've tried looking for sendmail, postfix, qmail, and opensmtpd in packages, but I couldn't find any.
The closest thing to a MTA like sendmail is msmtp.
pkg add -y msmtp
Arch wiki has some good config documentation.
Could it be that you are trying to open a tcp port below 1024 for SMTP, this would require your android to be rooted. Try testing with normal linux or raspberrypi.org
the requirement for root user on opening ports below 1024 is at binding the listener not a client calling a socket open.
This looks like something that can be handled by a mutt itself or with a cron that will check maildir outgoing and the call msmtp (e.g. sendmail) to deliver the message.
If you have a router nearby then you can install there emailrelay
package https://sourceforge.net/p/emailrelay/
And use it as a smarthost
@stokito it's not useful here, we're discussing a case when the phone is offline, so it has to have a local mail spool, which is processed once the phone gets online.
I wonder if com.android.printspooler
could be used for this purpose :shipit:
It just sends/broadcasts a file out🌏 after a handshake
Package description
I'm using some shell scripts in Termux that do some logging, which is then piped directly into
mutt
to send to my email address using the MX records of the domain name the email is from (pre-configured in~/.muttrc
withset smtp_url = smtp://example.org:25
andset from = android+termux+`whoami`+`hostname`@example.org
-- theFrom:
andTo:
are obviously required, but having to configuresmtp_url
when it can be deducted automatically by the mail spool software based on theTo:
email address is not the best user experience).I've tried looking for
sendmail
,postfix
,qmail
, andopensmtpd
in packages, but I couldn't find any.My scripts work great, except if there's no network connectivity. Then mutt simply fails, and, presumably, all logging that was piped to it to be sent over the network, is simply lost. A workaround is possible to log into the file, and then pipe the file to mutt, to be able to re-send the stuff should it fail, but it's more complicated than simply having sendmail, postfix, qmail, opensmtpd, or any other software, handle the mail spooling for you. (Another option might be for mutt to not discard the failed mail that was piped to it, but that would still require extra handling later on to re-send those manually.)
I think it'd be great if a mail spool package were to be available. It should work by default with
mutt
(unless outgoing smtp port is blocked), and apart from theFrom:
andTo:
fields inmutt
, shouldn't require any extra configuration form the user whatsoever (unless the smtp port is blocked, only then should a user be required to configure the smart-host alternative).Home page URL
No response
Source code URL
http://man.openbsd.org/sendmail.8
Packaging policy acknowledgement
Additional information
No response