Discussion:
gmail smtp server and git-send-mail. Is this combination working?
Paolo Ciarrocchi
2008-01-08 16:58:59 UTC
Permalink
Hi all,
as I previously wrote I would like to use git-send-email to send out a series
of patches.
While I was looking for documentation I saw the following statement in the
git wiki:

" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).

Thanks.

regards,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
Jason Sewall
2008-01-08 18:16:01 UTC
Permalink
I've had luck with msmtp: http://msmtp.sourceforge.net/; it's
basically a drop-in replacement for sendmail that supports the
authentication gmail requires.

A quick prayer to the Gods of Google portended this blog entry, which
spells out how to configure it for gmail pretty plainly:
http://typo.onxen.info/articles/2006/06/27/activemailer-sending-via-gmail

Then you just need to specify --smtp-serve /path/to/msmtp to
send-email and you're all set.

Jason
Post by Paolo Ciarrocchi
Hi all,
as I previously wrote I would like to use git-send-email to send out a series
of patches.
While I was looking for documentation I saw the following statement in the
" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).
Thanks.
regards,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line "unsubscribe git" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Pascal Obry
2008-01-08 18:25:39 UTC
Permalink
Paolo,

I never tried msmtp. I'm using Cygwin ssmtp to send e-mail via Google
mail. Works fine. If it can be useful to others:

My /etc/ssmtp/ssmtp.conf:

root=<username>@gmail.com
mailhub=smtp.gmail.com:587
FromLineOverride=YES
hostname=<username>@gmail.com
rewriteDomain=
UseSTARTTLS=YES
AuthUser=<username>@gmail.com
AuthPass=<password>

Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
Imran M Yousuf
2008-01-09 03:12:46 UTC
Permalink
Hi Paolo,

I just setup GMail with git-send-email using
http://git.or.cz/gitwiki/GitTips#head-a015948617d9becbdc9836776f96ad244ba87cb8.

Just add port 587 below the host and it should work fine. In the
username it should ***@gmail.com.

Best regards,

Imran
Post by Paolo Ciarrocchi
Hi all,
as I previously wrote I would like to use git-send-email to send out a series
of patches.
While I was looking for documentation I saw the following statement in the
" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).
Thanks.
regards,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line "unsubscribe git" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: ***@smartitengineering.com
Mobile: +880-1711402557
Douglas Stockwell
2008-01-09 04:06:14 UTC
Permalink
Post by Paolo Ciarrocchi
" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).
No, as of 34cc60ce2b48f6037997543ddbab1ed9903df4a8 you can use SSL and
SMTP-Auth.

[sendemail]
smtpserver = smtp.gmail.com
smtpuser = <user>@gmail.com
smtppass = <password>
smtpssl = true

Can you suggest changes to the documentation if these options are unclear?

Doug
Paolo Ciarrocchi
2008-01-09 23:09:08 UTC
Permalink
Post by Douglas Stockwell
Post by Paolo Ciarrocchi
" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).
No, as of 34cc60ce2b48f6037997543ddbab1ed9903df4a8 you can use SSL and
SMTP-Auth.
[sendemail]
smtpserver = smtp.gmail.com
smtppass = <password>
smtpssl = true
Can you suggest changes to the documentation if these options are unclear?
Well, it would be nice to add this information to the wiki, it's still
mentioning
that you require an external program for supporting the TLS connection.
I'll do that when I'll get my box working with the configuration you suggested,

What I'm getting at the moment is:
***@paolo-desktop:~/git$ git-send-email -compose -to
***@gmail.com /home/paolo/Desktop/patch/
snip
snip
Can't locate Net/SMTP/SSL.pm in @INC (@INC contains:
/home/paolo/share/perl/5.8.8 /etc/perl /usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at
/home/paolo/bin/git-send-email line 627.

Tv on #git helped me in finding an Ubuntu package which includes SSL.pm :
http://packages.ubuntu.com/cgi-bin/search_contents.pl?word=SSL.pm&searchmode=searchfiles&case=insensitive&version=gutsy&arch=i386
which repors:
usr/lib/perl5/Net/SSL.pm perl/libcrypt-ssleay-perl [universe]
usr/share/perl5/HTTP/Daemon/SSL.pm perl/libhttp-daemon-ssl-perl [universe]
usr/share/perl5/IO/Socket/SSL.pm perl/libio-socket-ssl-perl
usr/share/perl5/Net/IMAP/Simple/SSL.pm
perl/libnet-imap-simple-ssl-perl [universe]
usr/share/perl5/Net/Server/Proto/SSL.pm perl/libnet-server-perl [universe]
usr/share/perl5/POE/Component/Client/HTTP/SSL.pm
perl/libpoe-component-client-http-perl [universe]

I installed libcrypt-ssleay-perl but still no luck.

Regards,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
Douglas Stockwell
2008-01-10 03:45:15 UTC
Permalink
Post by Paolo Ciarrocchi
Well, it would be nice to add this information to the wiki, it's still
mentioning
that you require an external program for supporting the TLS connection.
I'll do that when I'll get my box working with the configuration you suggested,
snip
snip
As indicated, the module you need is Net::SMTP::SSL, if there is no
package for ubuntu, you can install it using CPAN:

perl -MCPAN -e 'install Net::SMTP::SSL'

Doug
Paolo Ciarrocchi
2008-01-10 11:13:04 UTC
Permalink
Post by Douglas Stockwell
Post by Paolo Ciarrocchi
Well, it would be nice to add this information to the wiki, it's still
mentioning
that you require an external program for supporting the TLS connection.
I'll do that when I'll get my box working with the configuration you suggested,
snip
snip
As indicated, the module you need is Net::SMTP::SSL, if there is no
perl -MCPAN -e 'install Net::SMTP::SSL'
Thank you. I'll try that and update the wiki with the information you provided
as soon as I have git-send-email working properly :-)

Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
Paolo Ciarrocchi
2008-01-10 22:49:11 UTC
Permalink
Post by Douglas Stockwell
Post by Paolo Ciarrocchi
Well, it would be nice to add this information to the wiki, it's still
mentioning
that you require an external program for supporting the TLS connection.
I'll do that when I'll get my box working with the configuration you suggested,
snip
snip
As indicated, the module you need is Net::SMTP::SSL, if there is no
perl -MCPAN -e 'install Net::SMTP::SSL'
I'm now getting:
Unable to initialize SMTP properly. Is there something wrong with
your config? at /home/paolo/bin/git-send-email line 638.

I tried to get help on #git but I failed, it looks like other people
are getting the same error.

Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
Baz
2008-01-11 12:19:16 UTC
Permalink
Post by Paolo Ciarrocchi
Post by Douglas Stockwell
Post by Paolo Ciarrocchi
Well, it would be nice to add this information to the wiki, it's still
mentioning
that you require an external program for supporting the TLS connection.
I'll do that when I'll get my box working with the configuration you suggested,
snip
snip
As indicated, the module you need is Net::SMTP::SSL, if there is no
perl -MCPAN -e 'install Net::SMTP::SSL'
Unable to initialize SMTP properly. Is there something wrong with
your config? at /home/paolo/bin/git-send-email line 638.
You also need to have Authen::SASL installed. Do you have that? As I
recall I needed to edit the code to even see that error.

With Authen::SASL and Net::SMTP::SSL, you can get 1 patch at a time in
via gmail. The alternative connection mode which git-send-email
doesn't support yet is to connect over smtp then negotiate TLS using
'STARTTLS'. If you do this then you can send multiple patches via
gmail with a single call to git-send-email.

There was a patch offered a while back from Simon Sasburg to add
starttls support to git-send-email. At the time I questioned it but I
hadn't seen the 1-patch-at-a-time limit then. Thread:
http://kerneltrap.org/mailarchive/git/2007/10/31/373400
(nb the key thing added by this patch is starttls, not tls)
Post by Paolo Ciarrocchi
I tried to get help on #git but I failed, it looks like other people
are getting the same error.
Hope this helps,
Baz
Post by Paolo Ciarrocchi
Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
-
To unsubscribe from this list: send the line "unsubscribe git" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Douglas Stockwell
2008-01-11 16:36:03 UTC
Permalink
Post by Baz
With Authen::SASL and Net::SMTP::SSL, you can get 1 patch at a time in
via gmail. The alternative connection mode which git-send-email
doesn't support yet is to connect over smtp then negotiate TLS using
'STARTTLS'. If you do this then you can send multiple patches via
gmail with a single call to git-send-email.
I just tested this. I *was* able to send multiple patches in a single call?

Doug
Baz
2008-01-11 17:22:14 UTC
Permalink
Post by Douglas Stockwell
Post by Baz
With Authen::SASL and Net::SMTP::SSL, you can get 1 patch at a time in
via gmail. The alternative connection mode which git-send-email
doesn't support yet is to connect over smtp then negotiate TLS using
'STARTTLS'. If you do this then you can send multiple patches via
gmail with a single call to git-send-email.
I just tested this. I *was* able to send multiple patches in a single call?
I'm not going to question the bearer of good news :). The error simon
Post by Douglas Stockwell
Well, it seems that this only works when sending only 1 patch, when
Post by Baz
5.7.0 No identity changes permitted. c14sm2136541nfi
(this was off-list at the tail end of the thread). IIRC I confirmed
that this happened to me but I've used msmtp ever since. Maybe
something's changed at the google end in the meantime.

And looking back at Paolo's problem I see its not going to be the
Authen::SASL problem, its too early in the code; its possible that
he's still trying to connect to port 587 (requires smtp/starttls) not
the default ssl port.
Post by Douglas Stockwell
Doug
Cheers,
Baz
Post by Douglas Stockwell
-
To unsubscribe from this list: send the line "unsubscribe git" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
Paolo Ciarrocchi
2008-02-24 21:42:13 UTC
Permalink
Post by Douglas Stockwell
perl -MCPAN -e 'install Net::SMTP::SSL'
still no luck:
git-send-email --to ***@gmail.com --smtp-server
smtp.gmail.com --smtp-user paolo.ciarrocchi --smtp-pass XXXX
/home/paolo/Desktop/patch/*
[...]
Who should the emails appear to be from? [Paolo
Ciarrocchi <***@gmail.com>]
Emails will be sent from: Paolo Ciarrocchi <***@gmail.com>
Message-ID to be used as In-Reply-To for the first
email?
(mbox) Adding cc: Paolo Ciarrocchi <***@gmail.com> from
line 'From: Paolo Ciarrocchi <***@gmail.com>'
(sob) Adding cc: Paolo Ciarrocchi <***@gmail.com> from
line 'Signed-off-by: Paolo Ciarrocchi <***@gmail.com>
'
Unable to initialize SMTP properly. Is there something wrong with
your config? at /home/paolo/bin/git-send-email line 719.

Ciao,
--
Paolo
http://paolo.ciarrocchi.googlepages.com/

Paolo Ciarrocchi
2008-01-10 11:17:26 UTC
Permalink
Post by Douglas Stockwell
Post by Paolo Ciarrocchi
" Mailing off a set of patches to a mailing list can be quite neatly
done by git-send-email.
One of the problems you may encounter there is figuring out which machine
is going to send your mail.
I tried smtp.gmail.com, but that one requires tls and a password,
and git-send-email could not handle that "
From http://git.or.cz/gitwiki/GitTips.
Is this statemant still correct ?
Is msmtp the only solution for using git-send-mail with gmail? (tls +
autentication).
No, as of 34cc60ce2b48f6037997543ddbab1ed9903df4a8 you can use SSL and
SMTP-Auth.
[sendemail]
smtpserver = smtp.gmail.com
smtppass = <password>
smtpssl = true
Can you suggest changes to the documentation if these options are unclear?
I got confuse by the ssl part in the name of the option,
I was looking and grepping for tls.

As I wrote in my previous email I think it's worth to add this very useful
information into the wiki as well.

Thanks.
--
Paolo
http://paolo.ciarrocchi.googlepages.com/
Loading...