Kinda made a mess trying to figure out mail and my board

So I switched to this VPS with minimal Linux experience, but has done OK. Yesterday, I successfully moved the final site to the new VPS, which is mainly a fairly active phpBB forum. I immediately realized it cannot send mail. I was going to try the citadel guide, and didn't do so well first time round.

I am back to wanting to figure out my problem with send mail rather than setup SMTP first. I looked at my mail.log and noticed there are a crap load of citadel errors repeating over and over:

Sep  5 23:56:31 * citadel: DB: no absolute path for the current directory: No such file or directory
Sep  5 23:56:31 * citadel: cdb_cull_logs: No such file or directory

I thought I took care of removing the related items to Citadel that the guide had me install, which was citadel itself, webcit and amavis, which I attempted earlier today. Looking at those time stamps, something is still going on.

So first off, whats the proper way to again try and remove/undo the installation of Citadel that the Citadel guide in the Library had me do here: http://library.linode.com/email/citadel … 0.04-lucid">http://library.linode.com/email/citadel/ubuntu-10.04-lucid

After that, I'd then like to resolve my sendmail problem.

17 Replies

I know diddly squat about citadel, apart from what it's for.

A quick read of the guide if you use

apt-get purge citadel-suite spamassassin amavisd-new

it will remove the packages and the configuration files.

For your email issue, do you want your server to receive email as well as send email?

If you're just trying to send e-mails from phpBB and don't want to manage incoming e-mails, you don't need anything as big as Citadel. Just install something lightweight, such as Postfix, and make it listen to localhost.

apt-get install postfix

It'll ask a couple of questions. Usually, you can just press enter.

Afterwards:

postconf -e "inet_interfaces = loopback-only"
/etc/init.d/postfix restart

@hybinet:

If you're just trying to send e-mails from phpBB and don't want to manage incoming e-mails, you don't need anything as big as Citadel. Just install something lightweight, such as Postfix, and make it listen to localhost.

apt-get install postfix

It'll ask a couple of questions. Usually, you can just press enter.

Afterwards:

postconf -e "inet_interfaces = loopback-only"
/etc/init.d/postfix restart

Well, after doing this, I no longer see the email mentions in the error log in phpBB, however, the emails are not being sent from the board still.

Edit: Oh, and my mail.log still shows Citadel errors. I ran the purge command on all the packages the guide for citadel had me install, and I had already done that so there was nothing to remove. I have no idea what is still causing Citadel errors to show up.

citadel-suite is a meta-package, the only purpose of which is to install a bunch of other packages using its dependency tree. (The same is true of other popular meta-packages such as mysql-server.) IIRC, when you apt-get purge a meta-package, its dependencies aren't automatically removed. So you probably still have Citadel running on your box, which could interfere with Postfix.

Try this:

apt-get purge citadel-common
apt-get autoremove

@hybinet:

citadel-suite is a meta-package, the only purpose of which is to install a bunch of other packages using its dependency tree. (The same is true of other popular meta-packages such as mysql-server.) IIRC, when you apt-get purge a meta-package, its dependencies aren't automatically removed. So you probably still have Citadel running on your box, which could interfere with Postfix.

Try this:

apt-get purge citadel-common
apt-get autoremove

It didn't find citadel-common, however it did find pkgs libdb4.7, m4, procmail, sendmail-base, sendmail-cf. So autoremove took care of those. Mail seems to still not being delivered.

Is there a simple php script I can upload to test the functionality of the php mail function?

And looking at mail.log, I still have something from Citadel writing to the log… this is bonkers.

Replace the first line with your e-mail address, upload it to an obscure location that other people won't be able to guess, and load it up using any web browser. The page will display either 0 or 1, meaning:

0 = Your MTA (e.g. Postfix) is not working. Fix it.

1 = Your MTA seems to be working fine, at least from PHP's point of view.

If you see 1 but your mail doesn't arrive, it's possible that the test message is being caught by a spam filter.

Also, install htop to see a nicely formatted list of processes. That's the easiest way to check if something is running which shouldn't be. If you're root, you can also kill them from htop.

@hybinet:

Also, install htop to see a nicely formatted list of processes. That's the easiest way to check if something is running which shouldn't be. If you're root, you can also kill them from htop.

OK, installed this and saw a few entries from citadel, webcit, and amavis. Killed them all. Not sure though if they will come back. Needless to say, still can't send emails from the board.

I might have gotten it working. After killing the citadel, webcit, and amavis tasks, mail.log was giving a postfix error about a public/pickup folder not existing. Some googling had me

sudo mkfifo /var/spool/postfix/public/pickup

and then

sudo /etc/init.d/postfix restart

After that, I started slowly getting some of the mass emails I sent from the board. I am still waiting to see if the PM notification emails get to me, maybe their in a spool somewhere waiting to be sent. I will test some of this later today.

OK, so far PM notifications are sending, mass emails, and subscription notices are working. This may finally be sorted out.

One final note/question: After removing everything citadel, webcit, and amavis related, there were still tasks running from them. Using htop I was able to kill them and that eventually led to me fixing the mail issue. Is there a way I can look to see if those tasks will start again if I ever reboot my linode? I assume restarting apache should not trigger tasks associated with those mail applications, but I thought it was odd that those tasks were left running even after removing all the associated apps with them.

Thanks again for all your help.

rm /etc/init.d/citadel update-rc.d -f citadel remove

This will prevent citadel from coming back up when you restart your system. Repeat for any other program that may not have been properly removed, such as spamassassin. If you can't find anything, you can rest assured that they won't come back to haunt you.

Ubuntu does sometimes mess up their install/removal scripts.

ran the update-rc.d on citadel, spamassassin, webcit, and amavis, and it only found stuff for amavis, as I did a pretty good job at hunting down and killing the others. So far everything seems pretty good.

I am sure the answer is in the library, but is using apt-get remove [appname] the right pratice for trying to remove applications, and also apt-get purge [appname]?

When there's ever a doubt about whether things will come back correctly after a reboot, it's a good idea to reboot while it's fresh in your mind. Otherwise, you're bound to get an unpleasant surprise some months down the line when you actually do have to reboot. And when that happens, it won't be fresh in your mind :-)

@telijah:

is using apt-get remove [appname] the right pratice for trying to remove applications, and also apt-get purge [appname]?

Yes, both are considered "the right way" to remove applications in Debian/Ubuntu.

"apt-get remove" only deletes the application.

"apt-get purge" deletes both the application and its configuration files (useful when you've messed up the config).

"apt-get autoremove" deletes any remaining dependencies.

If apt-get tells you that an application has been removed, but the app is still running, it's possible that the package maintainer has done something wrong. As I said, it happens from time to time with Ubuntu.

@hoopycat:

When there's ever a doubt about whether things will come back correctly after a reboot, it's a good idea to reboot while it's fresh in your mind. Otherwise, you're bound to get an unpleasant surprise some months down the line when you actually do have to reboot. And when that happens, it won't be fresh in your mind :-)

Effin fantastic idea actually, gonna go do that now, thanks!

Hybinet: Thanks again for your help in this. I now have the board emails working without issue. However, if I later do want to go back and setup an SMTP server to begin creating email accounts, will it interfere again? I know it is possible to have both mail systems working in tandem, just want to be a bit more careful next time round.

@telijah:

if I later do want to go back and setup an SMTP server to begin creating email accounts, will it interfere again? I know it is possible to have both mail systems working in tandem, just want to be a bit more careful next time round.
As long as you configure it properly, it should be fine. Just test it a lot. (Choose one: Postfix or Citadel. But not both at the same time.)

But I'd very much recommend outsourcing your e-mail accounts to something like Google Apps. That will save you a lot of time and resources. Also, when your web server goes down, you'll still receive e-mails.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct