sudo apt-get install mailxDuring the installation, it asked some questions which I did not know how to answer and just chose the defaults. Then I tried something like
ls -l |mailx myemail@address.comwhich indeed did not work. Then I started reading and realized that I should have probably used "Satellite" mode during installation....
Removing it should be easy, right? Well, sure, if you know what you are doing! I did not :)
sudo apt-get remove mailxsaid it removed the package but when I reinstalled it, it did not really ask me any questions which meant that I had not removed it completely. Reading some more on APT documentation, I learnt a few useful commands like
sudo apt-get --purge remove mailx(would remove mailx together with "configuration files")
Nope! Then I cleaned the cache:
sudo apt-cache autoclean(supposed to remove unupgradable packages from /var/cache/apt/archives)
and
sudo apt-cache clean(Removes everything except locks from apt-cache archives)
Still, I was missing something. The command I was looking for was something like
rpm -qpor
rpm -qlpthat would tell me more about package and its file.
I found something similar:
sudo apt-get depends mailxAha, I needed to remove postfix too. As expected, after that I was able to get the install menu. I chose satellite and specified smtp.comcast.net as my relay host. I got an error when I tried the above mailx command though:
mailx
Depends: libc6
Depends: liblockfile1
|Depends: postfix
Depends: <mail-transport-agent>
...
Depends: base-files
Conflicts: <suidmanager>
postdrop: warning: unable to look up public/pickup: No such file or directory
I did not find much info on the error but somebody was talking about authentication... Then, I remembered that comcast needs authentication and did some more google search and found a nice article.
I did everything mentioned but still the same issue. It looks like I am missing SASL now but readme is losing me...
[UPDATE - Aug.17 -2006]
Looking at the /var/log/mail.err files, I found out that it was complaining about a file missing
/etc/postfix/sasl_passwd.dbThen, I remembered that I had entered this line:
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwdinto /etc/postfix/main.cf
sasl_passwd file included something like this:
smtp.comcast.net myuserid:mypwdbut I had fat fingers and actually named the file not sasl_passwd but sasl_password and the accompanying .db file was named sasl_password.db. The thing is, running
sudo postmap sasl_passwdgave me an update error. So I left it as is.
So I corrected both and now when I tail /var/log/mail.info, while I run something like
ls -l|mails myemail@address.comI don't see errors:
Aug 17 00:13:20 ahlnx postfix/pickup[17245]: 6823B64707: uid=1000from=
Aug 17 00:29:45 ahlnx postfix/master[4870]: warning: /usr/lib/postfix/smtp: bad command startup -- throttling
I still had a hunch that there not being able to update that .db file was not good. Even stopping postfix was not enough:
sudo /etc/init.d/postfix stopSo, I removed it. Then changed the permissions on /etc/postfix
sudo chmod 777 /etc/postfixand ran the command again while I was in /etc/postfix directory :
sudo postmap sasl_passwdI got relatively better results:
Aug 17 00:39:22 ahlnx postfix/pickup[18775]: CC18F63A35: uid=1000 from=
Aug 17 00:39:22 ahlnx postfix/cleanup[18784]: CC18F63A35:
message-id=<20060817043922.cc18f63a35@ahlnx>
Aug 17 00:39:22 ahlnx postfix/qmgr[18776]: CC18F63A35: from=,
size=788, nrcpt=1 (queue active)
Aug 17 00:39:23 ahlnx postfix/smtp[18781]: CC18F63A35: to=,
relay=smtp.comcast.net[63.240.77.77], delay=1, status=bounced (hostsmtp.comcast.net[63.240.77.77] said: 550 [PERMFAIL]
comcast.net requires valid sender domain (in reply to RCPT TO command))
So, I needed to enter a valid address somewhere. Examining /etc/postfix/main.cf, I guessed that I had to activate this line:
myorigin=/etc/mailnameand created the file /etc/mailname, which included a single line like
comcast.net
That did the trick, and after reloading postfix
sudo /etc/init.d/postfix reloadI was able to send e-mails:
Aug 17 00:45:22 ahlnx postfix/master[18772]: reload configuration /etc/postfix
Aug 17 00:46:08 ahlnx postfix/pickup[19101]: 87A5163A35: uid=1000 from=
Aug 17 00:46:08 ahlnx postfix/cleanup[19148]: 87A5163A35:
message-id=<20060817044608.87a5163a35@ahlnx>
Aug 17 00:46:08 ahlnx postfix/qmgr[19102]: 87A5163A35: from=
Aug 17 00:46:09 ahlnx postfix/qmgr[19102]: 87A5163A35: removed
That was some experience! But as always, it feels good to make something finally work :)
No comments:
Post a Comment