Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

im on debian lenny, trac 0.11 (default for apt-get install trac)

I set up tickets notifications with gmail, sometimes they work, sometimes i get a nasty error, and with one user it has only worked once. all of my users have a gmail account.

sometimes i get this error:

2010-09-28 16:35:31,708 Trac[web_ui] ERROR: Failure sending  
notification on creation of ticket #15:   (-2, 'Name or service not  
known')  
Traceback (most recent call last):  
  File "/usr/lib/python2.5/site-packages/trac/ticket/web_ui.py", line  
962, in _do_create  
    tn.notify(ticket, newticket=True)  
  File "/usr/lib/python2.5/site-packages/trac/ticket/notification.py",  
line 148, in notify  
    NotifyEmail.notify(self, ticket.id, subject)  
  File "/usr/lib/python2.5/site-packages/trac/notification.py", line  
246, in notify  
    Notify.notify(self, resid)  
  File "/usr/lib/python2.5/site-packages/trac/notification.py", line  
134, in notify  
    self.begin_send()  
  File "/usr/lib/python2.5/site-packages/trac/notification.py", line  
318, in begin_send  
    self.server = smtplib.SMTP(self.smtp_server, self.smtp_port)  
  File "/usr/lib/python2.5/smtplib.py", line 244, in __init__  
    (code, msg) = self.connect(host, port)  
  File "/usr/lib/python2.5/smtplib.py", line 296, in connect  
    for res in socket.getaddrinfo(host, port, 0,  
socket.SOCK_STREAM):

Sometimes i get mails for some users, but one is always left out:

2010-09-28 16:49:51,519 Trac[notification] INFO: Sending SMTP
notification to smtp.gmail.com:587 to [u'ernesto.bu...@gmail.com',
u'pool...@gmail.com']

sometimes everything works!

AND sometimes i get a warning:

2010-09-28 15:53:55,932 Trac[notification] WARNING: Slow mail
submission (5.07 s), check your mail setup
2

here is the trac.ini notification part:

[notification]  
admit_domains =  
always_notify_owner = false  
always_notify_reporter = false  
always_notify_updater = true  
ignore_domains =  
mime_encoding = base64  
smtp_always_bcc = true  
smtp_always_cc = true  
smtp_default_domain =  
smtp_enabled = true  
smtp_from = mymail@gmail.com  
smtp_from_name = Trac Catwizard  
smtp_password = passwd  
smtp_port = 587  
smtp_replyto = mymail@gmail.com  
smtp_server = smtp.gmail.com  
smtp_subject_prefix = __default__  
smtp_user = mymail@gmail.com  
ticket_subject_template = $prefix #$ticket.id: $summary  
use_public_cc = false  
use_short_addr = false  
use_tls = true

after i was able to set this up, i was able to configure exim on my
debian to use gmail, maybe it´s better to send mails trhough exim ?
but how would be the configuration for that in trac. ini?

Help please!
And thank you!

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Well, if you've successfully configured exim to send through gmail, then that's the way to go. By doing this, you'll have trac handing mail off to "real" MTA that knows how to reliably deliver mail (queuing, retrying, etc.).

I assume you have exim listening on localhost (127.0.0.1) port 25. If this is the case, then just set the following in your trac.ini:

smtp_always_bcc = true
smtp_always_cc = true
smtp_default_domain =
smtp_enabled = true
smtp_from = mymail@gmail.com
smtp_from_name = Trac Catwizard
smtp_password =
smtp_port = 25
smtp_replyto = mymail@gmail.com
smtp_server = localhost
smtp_subject_prefix = default
smtp_user =
share|improve this answer
    
Hello ErikA, this solved the issue! thank you so much! the only thing is, now it seems that is sending one extra mail to gmail.com@gmail.com. Wonder what i got wrongly configured ? –  Ernest Sep 29 '10 at 21:44

You can find more information about setting up email sending using another account on the trac website: http://trac.edgewall.org/wiki/TracNotification#ExampleConfigurationSMTP

Also, you can verify there you gmail config on the same page as above.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.