Re: FW: ssmtp with multiple email accounts
See, I knew someone else must have run into this :-) George Davidovich, who would rather I didn't publish his email address, sent me this: -- Forwarded message -- IIRC, ssmtp is dead or dying and has a few outstanding issues, though both ssmtp and msmtp are available for Cygwin. The following is for msmtp. # # ~/.mutt/muttrc # folder-hook . set sendmail=/usr/local/bin/msmtp -a REAL folder-hook mbox1'set sendmail=/usr/local/bin/msmtp -a REAL' folder-hook mbox2'set sendmail=/usr/local/bin/msmtp -a OTHER' # # ~/.msmtprc # account REAL host my.smtp.host1 from some address auth login user foo password 012345 account OTHER host my.smtp.host2 from some other address auth login user bar password 012345 If you are intent on using ssmtp, something along the following (taken from an old muttrc file) should work: [..] folder-hook mbox1 \ 'set sendmail=/usr/sbin/ssmtp.exe [EMAIL PROTECTED] -ap012345' The ''set sendmail=/usr/sbin/ssmtp.exe -au...'' definitely works. What I couldn't get to work was ''set sendmail=/usr/sbin/ssmtp.exe -Csome config file'' but I haven't managed to get to the bottom of that yet. I kept getting a message something like Couldn't connect to mailhub:25 which was a bit odd because in the referenced config file I specified port 465 as I recall, so it isn't clear if it isn't picking up the file correctly or if there is an issue or incorrect error message in ssmtp, or what. I'm not so keen on using the folder-hook since I have *lots* of folders and so would need to keep the hooks sync'd with creation/deletion of folders, but it works fine for what it is. If I make any further advances I'll post to the list, but meanwhile I hope someone finds this info useful. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
On Wed, 30 Apr 2008, Gary wrote: On Wed, Apr 30, 2008 at 09:37:39AM +0200, [EMAIL PROTECTED] wrote: Oops. I know it's your own address, but still, http://cygwin.com/acronyms/#PCYMTNQREAIYR. If you are intent on using ssmtp, something along the following (taken from an old muttrc file) should work: [..] folder-hook mbox1 \ 'set sendmail=/usr/sbin/ssmtp.exe [EMAIL PROTECTED] -ap012345' The ''set sendmail=/usr/sbin/ssmtp.exe -au...'' definitely works. What I couldn't get to work was ''set sendmail=/usr/sbin/ssmtp.exe -Csome config file'' but I haven't managed to get to the bottom of that yet. Short version: set sendmail=/usr/bin/ssmtp -C/etc/ssmtp/config file works just fine in a folder-hook. Long version: If you are reading this then I solved the problem with the previously mentioned -C stuff - ssmtp does not seem to allow one to specify ~/foo.conf (for example) as the config file. If you set it to -C/etc/ssmtp/foo.conf then everything will be fine and you can happily have as many different email accounts and external mailhubs as your heart desires and you can maintain the configurations for. I don't know if not allowing the config file to be anywhere but /etc/ssmtp is a bug, a feature, or a random twist of fate, but it would be nice if the maintainer could mention it in the man file (or maybe I just missed it when I read it). Could it simply be that mutt does not expand the ~ in the filename when passing the command-line option? Did you try the absolute path (i.e., /usr/bin/ssmtp -C/home/user/foo.conf)? Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! That which is hateful to you, do not do to your neighbor. That is the whole Torah; the rest is commentary. Go and study it. -- Rabbi Hillel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
On Wed, Apr 30, 2008 at 09:37:39AM +0200, [EMAIL PROTECTED] wrote: If you are intent on using ssmtp, something along the following (taken from an old muttrc file) should work: [..] folder-hook mbox1 \ 'set sendmail=/usr/sbin/ssmtp.exe [EMAIL PROTECTED] -ap012345' The ''set sendmail=/usr/sbin/ssmtp.exe -au...'' definitely works. What I couldn't get to work was ''set sendmail=/usr/sbin/ssmtp.exe -Csome config file'' but I haven't managed to get to the bottom of that yet. Short version: set sendmail=/usr/bin/ssmtp -C/etc/ssmtp/config file works just fine in a folder-hook. Long version: If you are reading this then I solved the problem with the previously mentioned -C stuff - ssmtp does not seem to allow one to specify ~/foo.conf (for example) as the config file. If you set it to -C/etc/ssmtp/foo.conf then everything will be fine and you can happily have as many different email accounts and external mailhubs as your heart desires and you can maintain the configurations for. I don't know if not allowing the config file to be anywhere but /etc/ssmtp is a bug, a feature, or a random twist of fate, but it would be nice if the maintainer could mention it in the man file (or maybe I just missed it when I read it). -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
Igor Peshansky wrote: Could it simply be that mutt does not expand the ~ in the filename when passing the command-line option? Did you try the absolute path (i.e., /usr/bin/ssmtp -C/home/user/foo.conf)? ssmtp does not attempt any expansion on the argument. If the shell doesn't expand it before passing it off to ssmtp, then it doesn't get expanded: so -C~/foo.conf would cause ssmtp to try to open a file named foo.conf in the subdirectory ~ of the current directory. -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
On Wed, 30 Apr 2008, Charles Wilson wrote: Igor Peshansky wrote: Could it simply be that mutt does not expand the ~ in the filename when passing the command-line option? Did you try the absolute path (i.e., /usr/bin/ssmtp -C/home/user/foo.conf)? ssmtp does not attempt any expansion on the argument. If the shell doesn't expand it before passing it off to ssmtp, then it doesn't get expanded: so -C~/foo.conf would cause ssmtp to try to open a file named foo.conf in the subdirectory ~ of the current directory. Yes, that's exactly what I meant. Notice that I said *mutt* does not expand the ~ -- assuming mutt uses execv. Even if mutt uses /bin/sh -c on the command, the ~ inside the argument does not get expanded by shells, and the one in -C~/foo.conf is definitely inside. Looking at the man page, ssmtp requires that there be no space between -C and the filename, so looks like the OP is stuck with absolute paths. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! That which is hateful to you, do not do to your neighbor. That is the whole Torah; the rest is commentary. Go and study it. -- Rabbi Hillel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
Well, then mutt lets you choose *its* configuration file. Yeah, but then I have to know in advance which emails I am going to send before starting mutt, and I'm not that organised (it is pretty impractical anyway, due to replying to mails using different From addresses). Maybe my best bet is to run a script from mutt's send-hook to set up the ssmtp.conf correctly for the outgoing mail. Or maybe it is even possible to set the sendmail variable in the send-hook to something like /usr/sbin/ssmtp.exe -C~/.ssmtp/local-part.domain.conf. I was just kind of hoping someone had already done something, to save me the work :-) or that I'd just missed something in the way I am using mutt. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
Gary, On Tue, Apr 29, 2008 at 11:55:46AM +0200, Gary wrote: I was just kind of hoping someone had already done something, to save me the work :-) or that I'd just missed something in the way I am using mutt. I use fetchmail to pull down mail from multiple accounts (via IMAP and POP) to mbox files, one ssmtp configuration to send all outgoing mail [1], and mutt to read and write them. Why do you need multiple ssmtp configurations? Why can't you just use ssmtp to relay to your ISP's SMTP server for all of your outgoing mail? You can do this even if you use mutt to access your email via IMAP and/or POP directly. Jason [1] More precisely, I use ssmtp to deliver to my local exim server which is configured to relay to my ISP's SMTP server. -- PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: FW: ssmtp with multiple email accounts
Why do you need multiple ssmtp configurations? Why can't you just use ssmtp to relay to your ISP's SMTP server for all of your outgoing mail? I don't have access to a mailhub which allows what I need given ssmtp's limitation of one authenticating user. Taking one of the two that I use, gmail for my domain, as an example - It is required to authenticate using the name of the user sending the mail, which means that ssmtp.conf has to include that information (SmtpAuth=, I think, but don't have access to it ATM). If several users, i.e. me using several addreses on my domain for different reasons, want to send mail then ssmtp has to somehow know which user it has to authenticate with. It gets worse in that I have another account completely separate from gmail and my domain that I also want to send email from - they won't allow me to send email using any different address than is with them via their servers any more than gmail will allow me to send email for the separate email address (I could make it an alias in gmail, but would rather not). Maybe exim can be configured to do that translation, I don't know, but a) I prefer to have as few daemons/services running as I can, and b) secure configuration looks like a PITA. Other than that, I'm open to suggestions. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
FW: ssmtp with multiple email accounts
Gary wrote on Monday, April 28, 2008 3:30 PM: -Cfile Use alternate configuration file. Is that what you want? Not really, I don't think, because then mutt somehow needs to know to tell ssmtp to use that option and also which alternative file to use. Maybe part of the solution though, thanks. Well, then mutt lets you choose *its* configuration file. -F muttrc Specify an initialization file to read instead of ~/.muttrc Might that work with setting up a bunch of different muttrc files, each specifying a different ssmtp -Cfile ? Again, not that I know anything about this. ;-) Good luck. - Barry - Disclaimer: Statements made herein are not made on behalf of NIAID. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/