Kinda made a mess trying to figure out mail and my board
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:
After that, I'd then like to resolve my sendmail problem.
17 Replies
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?
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.
a bunch of other packages
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
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. a bunch of other packagesTry 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?
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.
@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.
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.
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.
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]?
@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.