Dylan Stamat | 17 May 06:50
Picon

sendmail_wait for smtp ?

When sending an email through a remote smtp server, the status bar goes
through it's sending process, like:

Sending...
Looking up etc...
Connecting etc...
SSL/TLS etc...
Authenticating LOGIN etc...

Is there any way to background this ?  Something like sendmail_wait=-1,
but for smtp ?  Waiting for mail to send can be time consuming.

Any tips are appreciated,
Thanks !
==
Dylan

Michael Kjorling | 17 May 10:25

Re: sendmail_wait for smtp ?

On 17 May 2008 16:53 +1200, by dylanstamat <at> gmail.com (Dylan Stamat):
> Is there any way to background this ?  Something like sendmail_wait=-1,
> but for smtp ?  Waiting for mail to send can be time consuming.

It's not exactly what you are looking for but what I have done is to
set up a minimal MTA on my workstation, listening only on loopback.
Sending an e-mail to that (including TLS, which is turned on by
default in my case) takes 1-2 seconds, and from that point on it
becomes the responsibility of the MTA to pass it on to my smarthost,
which is done in the background.

This has the added benefit that if the initial connection attempt
fails for some reason (has happened a few times in the past) I don't
have to wait for $connect_timeout before I can even make another
attempt. That, too, becomes the responsibility of the local MTA.

--

-- 
Michael Kjörling .. michael <at> kjorling.se .. http://michael.kjorling.se
* ..... No bird soars too high if he soars with his own wings ..... *
* ENCRYPTED email preferred -- OpenPGP key ID: 0x 758F8749 BDE9ADA6 *
* ASCII Ribbon Campaign: Against HTML mail, proprietary attachments *

Marianne Promberger | 17 May 14:35
Picon

Re: sendmail_wait for smtp ?

On 05/17/08 16:53, Dylan Stamat wrote:
> 
> Is there any way to background this ?  Something like sendmail_wait=-1,
> but for smtp ?  Waiting for mail to send can be time consuming.

I'm not sure if I understand correctly, but use msmtp to send through
an SMTP server of my ISP using 

set sendmail = "/usr/bin/msmtp -a default"

and I've recently discovered 

set sendmail_wait = -1

and it works like a charm. The only problem is I don't get error
messages in the rare event that there's a problem so I've written
a shell script to periodically check the mail logs (*):

http://promberger.info/linux/2008/04/13/shell-script-to-check-mail-logs-periodically/

On the laptop, I'm in fact using this with a script that does a mail
queue with msmtp that I found somewhere online:

http://promberger.info/linux/2008/04/11/mutt-with-msmtp-and-a-mail-queue/

m.

(*) There practically never is a problem unless I've fiddled with the
config file to try new stuff. IIRC, if you have "set record", mutt
stores a "sent" copy regardless of whether the mail went out or not,
(Continue reading)

Kyle Wheeler | 17 May 19:01

Re: sendmail_wait for smtp ?


On Saturday, May 17 at 04:53 PM, quoth Dylan Stamat:
>When sending an email through a remote smtp server, the status bar goes
>through it's sending process, like:
>
>Sending...
>Looking up etc...
>Connecting etc...
>SSL/TLS etc...
>Authenticating LOGIN etc...
>
>Is there any way to background this ?  Something like sendmail_wait=-1,
>but for smtp ?  Waiting for mail to send can be time consuming.

Yes and no. Mutt is not multithreaded, so you can't have it handle the 
SMTP connection in the background, so, NO. But if you really want it 
backgrounded, why not use a simple SMTP sender (like msmtp or 
nullmailer or something similar) instead of have mutt do it? That way 
you *can* background email sending.

~Kyle
--

-- 
Preach the Gospel at all times and when necessary use words.
                                               -- St. Francis of Assisi
Wilkinson, Alex | 18 May 11:16
Picon

Re: sendmail_wait for smtp ?


    0n Sat, May 17, 2008 at 12:01:38PM -0500, Kyle Wheeler wrote: 

    >Yes and no. Mutt is not multithreaded, so you can't have it handle the 
    >SMTP connection in the background, so, NO. But if you really want it 
    >backgrounded, why not use a simple SMTP sender (like msmtp or 
    >nullmailer or something similar) instead of have mutt do it? That way 
    >you *can* background email sending.

Is msmtp completely independent of a local MTA ? i.e. I would no longer need
to use my local sendmail for smart-relay anymore ?

 -aW

IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the
jurisdiction of section 70 of the CRIMES ACT 1914.  If you have received this email in error, you are
requested to contact the sender and delete the email.

Sahil Tandon | 18 May 17:37

Re: sendmail_wait for smtp ?

* Wilkinson, Alex <alex.wilkinson <at> dsto.defence.gov.au> [05-18-2008]:

>     0n Sat, May 17, 2008 at 12:01:38PM -0500, Kyle Wheeler wrote: 
> 
>     >Yes and no. Mutt is not multithreaded, so you can't have it handle the 
>     >SMTP connection in the background, so, NO. But if you really want it 
>     >backgrounded, why not use a simple SMTP sender (like msmtp or 
>     >nullmailer or something similar) instead of have mutt do it? That way 
>     >you *can* background email sending.
> 
> Is msmtp completely independent of a local MTA ? i.e. I would no longer need
> to use my local sendmail for smart-relay anymore ?

Correct. 

--

-- 
Sahil Tandon <sahil <at> tandon.net>

Dylan Stamat | 19 May 11:33
Picon

Re: sendmail_wait for smtp ?

Marianne, thank you very much for the links, and everybody else
for the suggestions.  Had no idea that Mutt wasn't multithreaded.

Using a local MTA is the ticket :)
Thanks !
==
Dylan

On Mon, May 19, 2008 at 3:37 AM, Sahil Tandon <sahil <at> tandon.net> wrote:
> * Wilkinson, Alex <alex.wilkinson <at> dsto.defence.gov.au> [05-18-2008]:
>
>>     0n Sat, May 17, 2008 at 12:01:38PM -0500, Kyle Wheeler wrote:
>>
>>     >Yes and no. Mutt is not multithreaded, so you can't have it handle the
>>     >SMTP connection in the background, so, NO. But if you really want it
>>     >backgrounded, why not use a simple SMTP sender (like msmtp or
>>     >nullmailer or something similar) instead of have mutt do it? That way
>>     >you *can* background email sending.
>>
>> Is msmtp completely independent of a local MTA ? i.e. I would no longer need
>> to use my local sendmail for smart-relay anymore ?
>
> Correct.
>
> --
> Sahil Tandon <sahil <at> tandon.net>
>


Gmane