0
Ajenti V Mail - 550 relay not permitted
Hello all! So, here I am with a clean server running CentOS 7, and the first thing that came to mind was installing Ajenti. After successfully installing Ajenti and Ajenti V, properly setting up my client's website, I made way to creating a mailbox. Now, I've encountered many problems past this point, so I'll include my DIY fixes after my main question.
My current issue, is that I cannot send or receive any emails from/into my mailbox. I have exim running, but no luck. I can log into the email server using IMAP and successfully connect to SMTP, but when attempting to do either of these actions I receive the error message -- relay not permitted. I can also check my inbox via IMAP, but that's the extent of my prowess. I'm not sure what else to do, I've been at this for hours. Any suggestions would be duly appreciated!
1. If you're coming from a clean install of CentOS, and haven't already installed the epel repo, do so by following these instructions - http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat.
2. Download the latest version of Courier here, http://www.courier-mta.org/download.html. As of yet there aren't any reliable repos with Courier RPMs available for RHEL/Cent.
3. Install rpmbuild if not installed already with the following command,
8b. If you cannot find the package via your available repos, your best bet would be google.
8c. If you receive any missing perl package errors run the following command,
1. Make sure courier-imapd service is running.
My current issue, is that I cannot send or receive any emails from/into my mailbox. I have exim running, but no luck. I can log into the email server using IMAP and successfully connect to SMTP, but when attempting to do either of these actions I receive the error message -- relay not permitted. I can also check my inbox via IMAP, but that's the extent of my prowess. I'm not sure what else to do, I've been at this for hours. Any suggestions would be duly appreciated!
Courier Fix For Ajenti-V-Mail Install - CentOS
> This is for those having trouble installing Ajenti-V-Mail on CentOS1. If you're coming from a clean install of CentOS, and haven't already installed the epel repo, do so by following these instructions - http://www.rackspace.com/knowledge_center/article/install-epel-and-additional-repositories-on-centos-and-red-hat.
2. Download the latest version of Courier here, http://www.courier-mta.org/download.html. As of yet there aren't any reliable repos with Courier RPMs available for RHEL/Cent.
3. Install rpmbuild if not installed already with the following command,
sudo yum -y install rpm-build4. Log into CentOS using a regular account, not root. If you don't have one already then you can create it by using the following commands,
sudo adduser bob sudo passwd bob5. In your home directory build Courier like so ( from your downloaded archive ),
rpmbuild -ta courier.tar.bz26. Navigate your built RPMs in the newly created "rpmbuild" directory.
cd rpmbuild/RPMs7. Delete all the unnecessary RPMs
- maildrop
- mlm
- sqweb
rm -rf x.rpm8. Try installing every remaining RPM with the following command
rpm -ivh *8a. If you receive any dependency errors, try installing them by their given name with yum.
8b. If you cannot find the package via your available repos, your best bet would be google.
8c. If you receive any missing perl package errors run the following command,
yum -y install perl*9. You should now be safe to install ajenti-v-mail without any given dependency errors.
IMAP Connection Refused - CentOS
> This is for those having trouble connecting to IMAP on CentOS with Courier1. Make sure courier-imapd service is running.
systemctl start courier-imap2. Open the following ports for IMAP/SMTP if not already done.
- 143
- 465
- 993
- 25
- 587
firewall-cmd --permanent --zone=public --add-port=143/tcp firewall-cmd --permanent --zone=public --add-port=465/tcp firewall-cmd --permanent --zone=public --add-port=993/tcp firewall-cmd --permanent --zone=public --add-port=25/tcp firewall-cmd --permanent --zone=public --add-port=587/tcp firewall-cmd --reload
Customer support service by UserEcho
and received the following output,
Heya,
Not sure if you are still keen to know, ran in to the same issue of "relay not permitted".
The issue is with courier-authdaemon - When you do a netstat -tulpna you'd see couriertcpd is running but when you run
you would get the following error message - At least that's what I got on Ubuntu 14.04
After a bit of googling, stumbled on this link - http://blog.cyberlynx.eu/2015/courier-authdaemon-init-script/
Just a little bit of tweaking in the following line in /etc/init.d/courier-authdaemon
The original line would be as follows
After making that change, when you restart courier-authdaemon it would run but you'd get the following error in /var/log/exim4/mainlog
You'll have to change the permission of /var/run/courier/authdaemon to 777.
Now, restart courier-daemon and exim4, this fixed the issue for me.
Hope this helps.
Cheers
PS: I was too quick to post, once I restarted the server, ran in to same error of Permission Denied, change the following line
like this
Restarted the server and found it to work this time around!
i made tutorial for installing ajenti on centos 7 this is the part for installing ajenvi-v-mail disable se-linux and firewalld # yum install ajenti-v-mail if you get error installing manually exim # yum install exim # adduser uucp # systemctl start exim # systemctl enable exim installing manually courier first install rpm-build # yum install rpm-build download courier # wget http://sourceforge.net/projects/courier/files/courier-unicode-devel/20150228/courier-unicode-1.1.20150228.tar.bz2 # wget http://sourceforge.net/projects/courier/files/authlib/0.66.2/courier-authlib-0.66.2.tar.bz2 if you get error from above wget , go to http://sourceforge.net/projects/courier/files/, and download manualy install needed package # yum install libtool openldap-devel mysql-devel zlib-devel sqlite-devel postgresql-devel gdbm-devel pam-devel expect gcc-c++ perl-Digest-MD5 libtool-ltdl-devel libtool-ltdl libidn-devel fam-devel build rpm for courier # rpmbuild -ta courier-unicode-1.1.20150228.tar.bz2 # cd /root/rpmbuild/RPMS/x86_64 # rpm -i courier-unicode-1.1.20150228-1.el7.centos.x86_64.rpm # rpm -i courier-unicode-debuginfo-1.1.20150228-1.el7.centos.x86_64.rpm # rpm -i courier-unicode-devel-1.1.20150228-1.el7.centos.x86_64.rpm # cd # rpmbuild -ta courier-authlib-0.66.2.tar.bz2 # cd /root/rpmbuild/RPMS/x86_64 # rpm -i courier-authlib-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-debuginfo-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-devel-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-ldap-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-mysql-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-pgsql-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-pipe-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-sqlite-0.66.2-1.el7.centos.x86_64.rpm # rpm -i courier-authlib-userdb-0.66.2-1.el7.centos.x86_64.rpm # adduser courier-user # passwd courier-user # su courier-user # cd # wget http://sourceforge.net/projects/courier/files/imap/4.16.1/courier-imap-4.16.1.tar.bz2 # rpmbuild -ta courier-imap-4.16.1.tar.bz2 # su # cd /home/courier-user/rpmbuild/RPMS/x86_64 # rpm -i courier-imap-4.16.1-2.x86_64.rpm # rpm -i courier-imap-debuginfo-4.16.1-2.x86_64.rpm # yum install ajenti-v-mail # systemctl start courier-imap # systemctl enable courier-imap # systemctl start courier-authlib # systemctl enable courier-authlib