bzr commit e-mail fails with bzr 2.4.x and 2.5.x on Fedora Core 14

Gaiseric Vandal gaiseric.vandal at
Wed May 16 16:28:10 UTC 2012

On 05/16/12 05:49, Vincent Ladeuil wrote:
>>>>>> Gaiseric Vandal <gaiseric.vandal at> writes:
>     > I am running Fedora Core 14 (X64.) I have uninstalled bzr 2.2.x
>     > packages. I have installed bzr 2.5.0 and bzr 2.5.0 from source I have
>     > also tried with bzr 2.6.B1 and bzr 2.4.2 + bzr plugins 2.4.1 .
> mail on commits didn't change for ages so all versions above should
> work.
>     > I want to enable commit e-mails. I have been trying to get this to work
>     > over the network (bzr+ssh or sftp) but with out luck. I have therefore
>     > created a local repository on my computer.
>     >                    /home/myname/bzr/localrepo/localrepo1
>     > which I have now checked out to
>     >                    /home/myname/bzr/workspace/localrepo1
> This is what I use:
> in ~/.bazaar/bazaar.conf:
>   smtp_server = localhost
>   post_commit_mailer = smtplib
> Note that 'smtp_server' reflects my local setup, use whatever is
> appropriate for you (an smtp server replying on the default 25 port or
> use stmp_server=host:port if you use a non-standard port).
> in ~/.bazaar/locations.conf:
>   [/home/vila/src/bzr]
>   post_commit_to = bazaar-commits at
> This instruct bzr to send an email to 'post_commit_to' when a commit
> occurs in '/home/vila/src/bzr' to the appropriate mailing list.
> Note that this applies to all branches below src/bzr and that it applies
> to branches, not working trees, so in your case you probably want to
> define a section for '/home/myname/bzr/localrepo/localrepo1'
>     -> bzr plugins
>     > bash_completion 2.4.2
>     >   Generate a shell function for bash command line completion.
>     > bzrtools 2.4.1
>     >   Various useful commands for working with bzr.
> You need the lp:bzr-email plugin:
>   mkdir -p ~/.bazaar/plugins
>   cd ~/.bazaar/plugins 
>   bzr branch lp:bzr-email email
> will install it in the right place, you can check it with:
>   bzr plugins -v
> <snip/>
>     -> bzr selftest email
> <snip/>
>     > ----------------------------------------------------------------------
>     > Ran 20 tests in 1.373s
>     > OK
> Those tests doesn't include *sending* emails ('bzr selftest --list email'
> will make it a tiny bit clearer and will change once the plugin is
> installed).
> Hth,
>         Vincent

That helps somewhat

I thought the bzrtools would include the necessary email plugins.  I
thought (incorrectly) bzr might just have a  single e-mail plugin     I
wasy able to use the " bzr branch lp:bzr-email email" command to install
the plugins for myself.  (I was also able to use "python
install" to install the plugins system wide, rather than just for myself.

bzr plugins -v now shows

  Sending emails for commits and branch changes.

That directory containers 

Now when I "bzr commit" I do get error messages about mail delivery.  So
I at least know the plugin is being called.

If I have "post_commit_mailer=smtplib" in my bazaar.conf set, then I get
the following error.

        -> pwd
        -> bzr commit --unchanged -m "test"
        Committing to:

        Committed revision

        bzr: ERROR: exceptions.AttributeError: 'SMTPConnection' object
has no attribute 'send_text_email'

I tried setting smtp_server to be both localhost or our main  mail
server.  Sendmail is running temporarily.    I have a 64-bit machine I
suspect there may be an issue since some some bzr (and python)  stuff is
in /usr/lib64/python2.7/ and some is in /usr/lib/python2.7/

If I don't "post_commit_mailer=smtplib"  specified I get the following error

        -> bzr commit --unchanged -m "test"
        Committing to:

        Committed revision

        From: myname at No such file or directory
        bzr: ERROR: Failed to send email: exit status 1

I have temporarily have sendmail running on my local machine. and are configured to use our main e-mail server
as a smart host, so sendmail normally doesn't need to run for the "mail"
command to work.    Sendmail only needs to run if configure smtplib to
use localhost.

The mail command supports -a and -s .  I would prefer to use the non
smtplib approach on linux machines.


More information about the bazaar mailing list