Re: sendmail in background?

2017-06-13 Thread Mark H. Wood
I've had good luck with nullmailer (to bounce everything through a
smarthost) and exim (as the smarthost).

-- 
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu


signature.asc
Description: PGP signature


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-12 Thread Oleg A. Mamontov

On Mon, Jun 12, 2017 at 03:58:27PM +0200, Georg Faerber wrote:

On 17-06-13 05:53:26, Yubin Ruan wrote:

offlineimap is not stable, I would say. It cannot handle non-latin
characters properly. And if your mailboxes are huge, it seems to go
into a infinite loop...


So have a look at isync / mbsync.


+1 here, mbsync works for me a way better then offlineimap (in terms of 
stability, speed of operations and CPU consumption).


--
Cheers,
Oleg A. Mamontov

mailto: o...@mamontov.net

skype:  lonerr11
cell:   +7 (903) 798-1352


Re: sendmail in background?

2017-06-12 Thread Ben McGinnes
On Sun, Jun 11, 2017 at 08:14:31AM +0100, Chris Green wrote:
> On Sun, Jun 11, 2017 at 07:33:18AM +1000, Ben McGinnes wrote:
>> 
>> Fortunately configuring Postfix is simple; either as easy or easier
>> than configuring Mutt.
>
> Friendly and helpful support from the Postix mailing list too.

That's always a plus.


Regards,
Ben


signature.asc
Description: PGP signature


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-12 Thread Georg Faerber
On 17-06-13 05:53:26, Yubin Ruan wrote:
> offlineimap is not stable, I would say. It cannot handle non-latin
> characters properly. And if your mailboxes are huge, it seems to go
> into a infinite loop...

So have a look at isync / mbsync.

Cheers,
Georg


signature.asc
Description: Digital signature


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-12 Thread Yubin Ruan
On Sun, Jun 11, 2017 at 12:23:28PM +0200, Georg Faerber wrote:
> On 17-06-12 02:05:41, Yubin Ruan wrote:
> > There is only problem I found when testing Postfix + mutt: I uses
> > Postfix for smtp and mutt deals with imap for me. But mutt will freeze
> > when the network is off. Therefore, you can not do anything at that
> > time, let alone sending email.
> > 
> > Any solution to that?
> 
> Use offlineimap, as discussed multiple times on this list.

offlineimap is not stable, I would say. It cannot handle non-latin characters
properly. And if your mailboxes are huge, it seems to go into a infinite
loop...

/Yubin


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-11 Thread Erik Christiansen
On 12.06.17 02:05, Yubin Ruan wrote:
> Thanks my friend. Postfix works pretty well :-)
> 
> There is only problem I found when testing Postfix + mutt: I uses
> Postfix for smtp and mutt deals with imap for me.

That is the problem, then. Many of us use fetchmail (or similar) to
handle the imap or pop3, then procmail to sort into multiple mailboxes,
if that is also desired. Either way, there is no freezing of mutt.

fetchmail - SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
fetchmailconf - fetchmail configurator

The latter is helpful when getting started.

Note: fetchmail normally delivers via SMTP to port 25 on the machine it
is running on (localhost), or if no port 25 listener is available, but
your fetchmail configuration was told about a reliable local MDA, it
will use that MDA for local delivery instead.

> But mutt will freeze when the network is off. Therefore, you can not
> do anything at that time, let alone sending email.

That is then not a useful configuration. Taking a process half way can
end up like that.

Erik


Re: Mutt freezes when network is off [was: sendmail in background?]

2017-06-11 Thread Georg Faerber
On 17-06-12 02:05:41, Yubin Ruan wrote:
> There is only problem I found when testing Postfix + mutt: I uses
> Postfix for smtp and mutt deals with imap for me. But mutt will freeze
> when the network is off. Therefore, you can not do anything at that
> time, let alone sending email.
> 
> Any solution to that?

Use offlineimap, as discussed multiple times on this list.

Cheers,
Georg


signature.asc
Description: Digital signature


Mutt freezes when network is off [was: sendmail in background?]

2017-06-11 Thread Yubin Ruan
On Sun, Jun 11, 2017 at 08:14:31AM +0100, Chris Green wrote:
> On Sun, Jun 11, 2017 at 07:33:18AM +1000, Ben McGinnes wrote:
> > On Fri, Jun 09, 2017 at 04:43:46PM +0100, Chris Green wrote:
> > > On Fri, Jun 09, 2017 at 11:50:01PM +1000, Ben McGinnes wrote:
> > >> 
> > >> I do the same thing, except the Postfix instance on the laptop is
> > >> configured to relay through the Postfix instance on the MX server.
> > >> Basically because the current connection and IP aren't in my name
> > >> and I can't be certain that all receiving MX servers will accept
> > >> mail from it directly.  Then I just need to make sure that the
> > >> relaying is authenticated appropriately and it's all fine.
> > >> 
> > > Yes, of course, my Postfix sends E-Mail off to my hosting company's
> > > 'smart host' for much the same reason.
> > 
> > I mentioned it probably more because that's a relatively recent change
> > for me.  Up until early last year I was also running my mail server in
> > my house (not the rest of the domain, just the MX).  So even with a
> > second Postfix instance on the laptop it was still configured to
> > connect directly, the SMTP IP was the same.  Even after I moved the MX
> > out of the country, I still got away with the original configuration
> > while the old link was still active, but that changed at the end of
> > last year.
> > 
> > Fortunately configuring Postfix is simple; either as easy or easier
> > than configuring Mutt.
> > 
> Friendly and helpful support from the Postix mailing list too.

Thanks my friend. Postfix works pretty well :-)

There is only problem I found when testing Postfix + mutt: I uses Postfix for
smtp and mutt deals with imap for me. But mutt will freeze when the network
is off. Therefore, you can not do anything at that time, let alone sending
email.

Any solution to that?

/Yubin


Re: sendmail in background?

2017-06-11 Thread Chris Green
On Sun, Jun 11, 2017 at 07:33:18AM +1000, Ben McGinnes wrote:
> On Fri, Jun 09, 2017 at 04:43:46PM +0100, Chris Green wrote:
> > On Fri, Jun 09, 2017 at 11:50:01PM +1000, Ben McGinnes wrote:
> >> 
> >> I do the same thing, except the Postfix instance on the laptop is
> >> configured to relay through the Postfix instance on the MX server.
> >> Basically because the current connection and IP aren't in my name
> >> and I can't be certain that all receiving MX servers will accept
> >> mail from it directly.  Then I just need to make sure that the
> >> relaying is authenticated appropriately and it's all fine.
> >> 
> > Yes, of course, my Postfix sends E-Mail off to my hosting company's
> > 'smart host' for much the same reason.
> 
> I mentioned it probably more because that's a relatively recent change
> for me.  Up until early last year I was also running my mail server in
> my house (not the rest of the domain, just the MX).  So even with a
> second Postfix instance on the laptop it was still configured to
> connect directly, the SMTP IP was the same.  Even after I moved the MX
> out of the country, I still got away with the original configuration
> while the old link was still active, but that changed at the end of
> last year.
> 
> Fortunately configuring Postfix is simple; either as easy or easier
> than configuring Mutt.
> 
Friendly and helpful support from the Postix mailing list too.

-- 
Chris Green


Re: sendmail in background?

2017-06-10 Thread Patrick Shanahan
* Cameron Simpson  [06-10-17 18:44]:
 [...]
> Many of us configure our local mail systems to use a "smarthost", which is
> nothing more than an upstream SMTP server to take our email. This is largely
> because is it not uncommon for ISP's to prevent direct outbound SMTP from
> their clients, a legacy of spambots. It your email is getting through then
> your ISP is not getting in the way.

I have not experienced a problem sending direct from my server but the
rejection from receivers because I don't have a static ip is the problem.

Many years ago I wrote a script to send queued mail when it determined I
had a connection, dial-up.
-- 
(paka)Patrick Shanahan   Plainfield, Indiana, USA  @ptilopteri
http://en.opensuse.orgopenSUSE Community Memberfacebook/ptilopteri
Registered Linux User #207535@ http://linuxcounter.net
Photos: http://wahoo.no-ip.org/piwigo   paka @ IRCnet freenode


Re: sendmail in background?

2017-06-10 Thread Cameron Simpson

On 11Jun2017 05:22, Yubin Ruan  wrote:

> my .muttrc contains this:
> #set sendmail="/usr/sbin/sendmail -oem -ob"
> set sendmail_wait=-1

How do you configure your /usr/bin/sendmain? It seems like that without
`sendmail' that sendmail_wait does not take effect and I still get delays when
sending mails.


One awkward thing is, with the configuration

   set sendmail="/usr/sbin/sendmail -oem -ob"
   set sendmail_wait=-1

things work pretty well, but I don't know how this magic happen, because I
never configure my /usr/sbin/sendmail and it know my SMTP address and
password...?


Then presumably your local mail system is sending SMTP directly to the target 
mail servers, and not using your ISP's SMTP server. (That is all your ISP's 
server is doing anyway.)


Have a look in /var/log for recently modified files - your mail system should 
be logging that it sent the email, and to whom it was delivered.


Many of us configure our local mail systems to use a "smarthost", which is 
nothing more than an upstream SMTP server to take our email. This is largely 
because is it not uncommon for ISP's to prevent direct outbound SMTP from their 
clients, a legacy of spambots. It your email is getting through then your ISP 
is not getting in the way.


Cheers,
Cameron Simpson 


Re: sendmail in background?

2017-06-10 Thread Ben McGinnes
On Fri, Jun 09, 2017 at 04:43:46PM +0100, Chris Green wrote:
> On Fri, Jun 09, 2017 at 11:50:01PM +1000, Ben McGinnes wrote:
>> 
>> I do the same thing, except the Postfix instance on the laptop is
>> configured to relay through the Postfix instance on the MX server.
>> Basically because the current connection and IP aren't in my name
>> and I can't be certain that all receiving MX servers will accept
>> mail from it directly.  Then I just need to make sure that the
>> relaying is authenticated appropriately and it's all fine.
>> 
> Yes, of course, my Postfix sends E-Mail off to my hosting company's
> 'smart host' for much the same reason.

I mentioned it probably more because that's a relatively recent change
for me.  Up until early last year I was also running my mail server in
my house (not the rest of the domain, just the MX).  So even with a
second Postfix instance on the laptop it was still configured to
connect directly, the SMTP IP was the same.  Even after I moved the MX
out of the country, I still got away with the original configuration
while the old link was still active, but that changed at the end of
last year.

Fortunately configuring Postfix is simple; either as easy or easier
than configuring Mutt.


Regards,
Ben


signature.asc
Description: PGP signature


Re: sendmail in background?

2017-06-10 Thread Yubin Ruan
> > my .muttrc contains this:
> > 
> > #set sendmail="/usr/sbin/sendmail -oem -ob"
> > set sendmail_wait=-1
> 
> How do you configure your /usr/bin/sendmain? It seems like that without
> `sendmail' that sendmail_wait does not take effect and I still get delays when
> sending mails.

One awkward thing is, with the configuration

set sendmail="/usr/sbin/sendmail -oem -ob"
set sendmail_wait=-1

things work pretty well, but I don't know how this magic happen, because I
never configure my /usr/sbin/sendmail and it know my SMTP address and
password...?

/Yubin


Re: sendmail in background?

2017-06-10 Thread Yubin Ruan
On Fri, Jun 09, 2017 at 09:35:19AM -0400, Fred Smith wrote:
> On Sat, Jun 10, 2017 at 04:42:42AM +0800, Yubin Ruan wrote:
> > Hi mutt users,
> > 
> > Hmm...do any of you have any solution for sending emails in background
> > without hanging up your mutt? I am getting annoyed by the delay coming with
> > mutt's default smtp. I would like to have a sendmail script that would queue
> > up my all my emails from mutt and send it at proper time and if it fails, it
> > will notify me with a failure status or failure messages. 
> > 
> > Currently I have a msmtp set up, with its .msmtprc like this:
> > 
> > account default 
> > host smtp.gmail.com
> > from 
> > auth on
> > port 587
> > user 
> > password 
> > protocol smtp
> > logfile ~/.msmtp.log
> > tls on
> > tls_starttls on
> > tls_nocertcheck
> > 
> > and my .muttrc like this:
> > 
> > set sendmail="/usr/bin/msmtp"
> > # don't wait for msmtp to complete. Let it run at background
> > set sendmail_wait=-1
> > 
> > But there some problems with this solution:
> > 
> > 1. the "sendmail_wait=-1" doesn't seems work?
> > 2. when I cutt off my network connection, mutt cannot sendmail anymore.
> > It just hang up there infinitely and I have to Ctrl-C... 
> > 
> > Any suggestion?
> 
> my .muttrc contains this:
> 
> #set sendmail="/usr/sbin/sendmail -oem -ob"
> set sendmail_wait=-1

How do you configure your /usr/bin/sendmain? It seems like that without
`sendmail' that sendmail_wait does not take effect and I still get delays when
sending mails.

/Yubin
 
> While I am now using a full-time connection (cable modem) years ago
> I was on a dialup system, and I don't think I've changed those settings
> since then, and it all just magically worked.
> 
> I certainly don't get long delays when sending mail from mutt. It
> seems to just queue them up, though sending a mail from mutt also seems
> to trigger sendmail to connect and send, mutt doesn't make me wait
> while it does that.


Re: sendmail in background?

2017-06-09 Thread Chris Green
On Fri, Jun 09, 2017 at 11:50:01PM +1000, Ben McGinnes wrote:
> On Fri, Jun 09, 2017 at 01:56:52PM +0100, Chris Green wrote:
> > 
> > I use postfix which, while it is a full-blown SMTP server, isn't
> > difficult to configure (well I managed it!).  Postfix will queue
> > outgoing mail so its sendmail responds instantly and I never see any
> > delays from mutt.
> 
> I do the same thing, except the Postfix instance on the laptop is
> configured to relay through the Postfix instance on the MX server.
> Basically because the current connection and IP aren't in my name and
> I can't be certain that all receiving MX servers will accept mail from
> it directly.  Then I just need to make sure that the relaying is
> authenticated appropriately and it's all fine.
> 
Yes, of course, my Postfix sends E-Mail off to my hosting company's
'smart host' for much the same reason.



-- 
Chris Green


Re: sendmail in background?

2017-06-09 Thread Fred Smith
On Sat, Jun 10, 2017 at 04:42:42AM +0800, Yubin Ruan wrote:
> Hi mutt users,
> 
> Hmm...do any of you have any solution for sending emails in background
> without hanging up your mutt? I am getting annoyed by the delay coming with
> mutt's default smtp. I would like to have a sendmail script that would queue
> up my all my emails from mutt and send it at proper time and if it fails, it
> will notify me with a failure status or failure messages. 
> 
> Currently I have a msmtp set up, with its .msmtprc like this:
> 
> account default 
> host smtp.gmail.com
> from 
> auth on
> port 587
> user 
> password 
> protocol smtp
> logfile ~/.msmtp.log
> tls on
> tls_starttls on
> tls_nocertcheck
> 
> and my .muttrc like this:
> 
> set sendmail="/usr/bin/msmtp"
> # don't wait for msmtp to complete. Let it run at background
> set sendmail_wait=-1
> 
> But there some problems with this solution:
> 
> 1. the "sendmail_wait=-1" doesn't seems work?
> 2. when I cutt off my network connection, mutt cannot sendmail anymore.
> It just hang up there infinitely and I have to Ctrl-C... 
> 
> Any suggestion?

my .muttrc contains this:

#set sendmail="/usr/sbin/sendmail -oem -ob"
set sendmail_wait=-1

While I am now using a full-time connection (cable modem) years ago
I was on a dialup system, and I don't think I've changed those settings
since then, and it all just magically worked.

I certainly don't get long delays when sending mail from mutt. It
seems to just queue them up, though sending a mail from mutt also seems
to trigger sendmail to connect and send, mutt doesn't make me wait
while it does that.

-- 
 Fred Smith -- fre...@fcshome.stoneham.ma.us -
The Lord detests the way of the wicked 
  but he loves those who pursue righteousness.
- Proverbs 15:9 (niv) -


Re: sendmail in background?

2017-06-09 Thread Ben McGinnes
On Fri, Jun 09, 2017 at 01:56:52PM +0100, Chris Green wrote:
> 
> I use postfix which, while it is a full-blown SMTP server, isn't
> difficult to configure (well I managed it!).  Postfix will queue
> outgoing mail so its sendmail responds instantly and I never see any
> delays from mutt.

I do the same thing, except the Postfix instance on the laptop is
configured to relay through the Postfix instance on the MX server.
Basically because the current connection and IP aren't in my name and
I can't be certain that all receiving MX servers will accept mail from
it directly.  Then I just need to make sure that the relaying is
authenticated appropriately and it's all fine.


Regards,
Ben


signature.asc
Description: PGP signature


Re: sendmail in background?

2017-06-09 Thread Joerg Dorchain
On Sat, Jun 10, 2017 at 04:42:42AM +0800, Yubin Ruan wrote:
> Hi mutt users,
> 
> Hmm...do any of you have any solution for sending emails in background
> without hanging up your mutt? I am getting annoyed by the delay coming with
> mutt's default smtp. I would like to have a sendmail script that would queue
> up my all my emails from mutt and send it at proper time and if it fails, it
> will notify me with a failure status or failure messages. 

That sounds like you want to have a MTA which does queuing and is
triggered by whatever (e.g. internet up) to run queues. 

sendmail can do that, but also exim, postfix,...
uucp, too, for a honorable mention.

Not sure if nullmailer does queueing.

Bye,

Joerg


signature.asc
Description: PGP signature


Re: sendmail in background?

2017-06-09 Thread Chris Green
On Sat, Jun 10, 2017 at 04:42:42AM +0800, Yubin Ruan wrote:
> Hi mutt users,
> 
> Hmm...do any of you have any solution for sending emails in background
> without hanging up your mutt? I am getting annoyed by the delay coming with
> mutt's default smtp. I would like to have a sendmail script that would queue
> up my all my emails from mutt and send it at proper time and if it fails, it
> will notify me with a failure status or failure messages. 
> 
> Currently I have a msmtp set up, with its .msmtprc like this:
> 
> account default 
> host smtp.gmail.com
> from 
> auth on
> port 587
> user 
> password 
> protocol smtp
> logfile ~/.msmtp.log
> tls on
> tls_starttls on
> tls_nocertcheck
> 
> and my .muttrc like this:
> 
> set sendmail="/usr/bin/msmtp"
> # don't wait for msmtp to complete. Let it run at background
> set sendmail_wait=-1
> 
> But there some problems with this solution:
> 
> 1. the "sendmail_wait=-1" doesn't seems work?
> 2. when I cutt off my network connection, mutt cannot sendmail anymore.
> It just hang up there infinitely and I have to Ctrl-C... 
> 
I use postfix which, while it is a full-blown SMTP server, isn't
difficult to configure (well I managed it!).  Postfix will queue
outgoing mail so its sendmail responds instantly and I never see any
delays from mutt.

-- 
Chris Green


Re: sendmail in background?

2017-06-09 Thread Matthias Apitz
El día sábado, junio 10, 2017 a las 04:42:42a. m. +0800, Yubin Ruan escribió:

> and my .muttrc like this:
> 
> set sendmail="/usr/bin/msmtp"
> # don't wait for msmtp to complete. Let it run at background
> set sendmail_wait=-1
> 
> But there some problems with this solution:
> 
> 1. the "sendmail_wait=-1" doesn't seems work?
> 2. when I cutt off my network connection, mutt cannot sendmail anymore.
> It just hang up there infinitely and I have to Ctrl-C... 
> 
> Any suggestion?

I use /usr/sbin/sendmail which hands it over to the local MTA (which is
sendmail on my netbook too) which will send it out whenever Internet is
up;

matthias


-- 
Matthias Apitz, ✉ g...@unixarea.de, ⌂ http://www.unixarea.de/  ☎ 
+49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
8. Mai 1945: Wer nicht feiert hat den Krieg verloren.
8 de mayo de 1945: Quien no festeja perdió la Guerra.
May 8, 1945: Who does not celebrate lost the War.


signature.asc
Description: PGP signature


sendmail in background?

2017-06-09 Thread Yubin Ruan
Hi mutt users,

Hmm...do any of you have any solution for sending emails in background
without hanging up your mutt? I am getting annoyed by the delay coming with
mutt's default smtp. I would like to have a sendmail script that would queue
up my all my emails from mutt and send it at proper time and if it fails, it
will notify me with a failure status or failure messages. 

Currently I have a msmtp set up, with its .msmtprc like this:

account default 
host smtp.gmail.com
from 
auth on
port 587
user 
password 
protocol smtp
logfile ~/.msmtp.log
tls on
tls_starttls on
tls_nocertcheck

and my .muttrc like this:

set sendmail="/usr/bin/msmtp"
# don't wait for msmtp to complete. Let it run at background
set sendmail_wait=-1

But there some problems with this solution:

1. the "sendmail_wait=-1" doesn't seems work?
2. when I cutt off my network connection, mutt cannot sendmail anymore.
It just hang up there infinitely and I have to Ctrl-C... 

Any suggestion?

--
Yubin