Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've already installed Bugzilla and I'm trying to the mailing functionality working. Apparently it can use the linux sendmail to do so. I don't know the first thing about how email even works. I've looked online a LOT for a tutorial to explain how the whole process works (sendmail, SMTP, domains, etc.)

Can someone please point me to a tutorial that explains the basics, and then help install sendmail so that Bugzilla can send outbound emails?

p.s. I don't have a domain. This is going to be running off of our dev server. Do you NEED a separate mail server or domain to get sendmail working? I don't need to receive any email, just send them out!

share|improve this question
What Linux distribution? – Kyle Brandt May 27 '09 at 19:15
This is Ubuntu 8.10 – Ali May 27 '09 at 19:20
I can't remember if sendmail came with this distro or I had to install it thru Synaptic Package Mangers or apt-get. But right now, sendmail is installed sendmail -d0.1 > gives me the version 8.14.3 – Ali May 27 '09 at 19:24
Where do you need to send email to? Your ISPs mail gateway? An in office "smart host"? Also, on Ubuntu setting up postfix is usually a lot more straightforward. – jharley May 27 '09 at 19:24

Found the perfect solution for setting up Bugzilla with gmail SMTP. It's a little hacky but haven't been able to find anything better.

The problem is that Gmail's SMTP is running over SSL, and bugzilla doesn't have support for that. So you need to install the perl Email::Send::SMTP::TLS module and tweek Bugzilla's code. All of it is explained here:

WARNING: you need to add the following two lines of code (omitted from tutorial) in, line 57: my $smtp_server; my $emtp_port;

Best of luck!

share|improve this answer

Bugzilla -> Configuration -> Email

Yes you need a SMTP server

Select sendmail if running in a Linux server that has sendmail installed and is working (try service sendmail start in a shell)

Or select SMTP and add the smtp server in smtpserver, if you have a "free" account somewhere maybe they have a SMTP server that you can use (will need user/password).

share|improve this answer

Coming back to this because there was recently a security update for bugzilla on debian. The deb default is to overwrite /usr/share/perl5/Bugzilla/ That means we have to repeat the process of modifying the code as described previously ( )

In summary, this is what you have to do:

    1) modify /usr/share/perl5/Bugzilla/ and add "use Email::Send::SMTP::TLS;"

    2) modify /usr/share/perl5/Bugzilla/ and add "my ($smtp_server,$smtp_port);" under "sub MessageToMTA {"

    3) search in /usr/share/perl5/Bugzilla/ for "SMTP" and change the if-clause to following:

    if ($method eq "SMTP" || $method eq "SMTP::TLS") {
        ($smtp_server,$smtp_port) = split /:/,Bugzilla->params->{"smtpserver"};
        push @args, Host  => $smtp_server,
        User => Bugzilla->params->{"smtp_username"},
        Password => Bugzilla->params->{"smtp_password"},
        Hello => $hostname,
        Debug => Bugzilla->params->{'smtp_debug'};
        push @args, Port => $smtp_port if($smtp_port);
share|improve this answer

Here are the questions that should really be answered by you before any useful answers can be given:

You want people to receive email from Bugzilla. Do you want them to receive it at email addresses that already exist (like someone's gmail account), or are you wanting to create email addresses for them to access?

By default, sendmail will probably be running on your server. I don't know what distribution you are using, but chances are very good that one of two commands will install it if it isn't:

For RedHat based systems, 'yum -y install sendmail' will do it, and for debian based systems, 'apt-get install sendmail' will do the same.

By default, sendmail should allow you to send email to existing domains. To test this, from the command line, type

echo test | mail -s "Test 1"

Because I'm a new member, I'm not allowed to post hyperlinks, but a quick google search for linux sendmail tutorial will give you plenty.

share|improve this answer

I'll try to answer all your questions in here: (sorry I had a temp account here, which after I deleted my cookies, I can't access any longer :S) @Kyle - I'm trying to send email to normal domains like yahoo, gmail, etc. Nothing fancy going on here - I don't think I can use postfix, since Bugzilla only has the following options: SMTP, Sendmail, None.

@Javier - I do have sendmail installed and the daemon is running (ps aux | grep sendmail) - I tried putting in a gmail account with the following: * SMTP server: * smpt_user and stmp_pass were set as well (checked them) Now, it says that it has sent emails (no longer complains that it can't send emails) but nothing arrives in the inbox! I would REALLY like to use this option, since it seems like the easiest way.

@standalone-sysadmin - I'm running Ubuntu 8.10 - tested echo test | mail -s "Test 1" and here's what I get: The program 'mail' can be found in the following packages: * heirloom-mailx * mailutils Try: apt-get install -bash: mail: command not found

I did "apt-get install mailutils" and now when I run the command, it doesn't complain or say anything, but no mail arrives in my inbox. - I've already looked for sendmail tutorials a lot, but most of them are REALLY complicating stuff, so I couldn't quite follow them.

Thanks again for all of your help guys.

share|improve this answer

line 58 should be my $smtp_port;

share|improve this answer

Your Answer


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