Pages

Showing posts with label Email. Show all posts
Showing posts with label Email. Show all posts

Sunday, July 29, 2018

Common SSH Commands - Linux Shell Commands

Navigation

pwd Shows the full path of the current directory
ls Lists all the files in the current directory
ls -al Lists all files and information
ls –alR Lists all files and information in all subdirectories
ls -alR | more Same as ls –alR, pausing when screen becomes full
ls -alR > filename.txt Same as ls –alR, outputs the results to a file
ls *.html Lists all files ending with .html
cd [directory name] Changes to a new directory
cd .. Changes to directory above current one
clear Clears the screen
vdir Gives a more detailed listing than the "ls" command
exit Log off your shell

Moving, Copying, and Deleting Files

mv [old filename] [new filename] Move/rename a file
cp [filename] [new filename] Copies a file
rm [filename] Deletes a file
rm * Deletes all files in current directory
rm *.html Deletes all files ending in .html
Creating, Moving, Copying and Deleting Directories
mkdir [directory name] Creates a new directory
ls -d */ Lists all directories within current directory
cp -r [directory] [new directory] Copies a directory and all files/directories in it
Searching Files and Directories
find . -name [filename] -print Searches for a file starting with current directory
grep [text] [filename] Searches for text within a file


Friday, January 26, 2018

Outlook - Update to enable TLS 1.1 and TLS 1.2 as a default secure protocols

Due to the recent version changes, cPanel software uses a secure version of TLS, v1.2 and will prevent email clients from accessing secure email with older, less secure ones such as TLS v.1.1 , TLS v.1.0 and SSL 2 and 3 . It is possible that the version of the mail client being used or the version of windows is the major reason for the recent issues. For example, if on Windows 7, Windows 7 may not be fully up to date or may not offer appropriate support for the minimum required version of TLS cpanel now support. Microsoft itself has published methods of allowing this to work:

It is better to try configuring your  operating systems and web browsers to use TLS v1.2 according to sites such as these:
 

Follow the instructions below:

Tuesday, March 22, 2016

Setting up emails to forward and delete automatically

The developers at cPanel removed the aging option in the latest version. However, you actually don’t need to have the email address setup in Mail > Add/Remove/Manage Accounts.

For example, let’s say you want any emails that goes to sales@yourdomain.com to forward to you@gmail.com. You don’t have to set up sales@yourdomain.com in Mail > Add/Remove/Manage Accounts.

Just go into cPanel > Mail > Forwarders > Add Forwarder.

In the first box you would enter ‘sales’ and then you would select the correct domain (if you have more than one domain set up). In the second box you enter you@gmail.com.

Now, when someone emails sales@yourdomain.com, the email will be forwarded to you@gmail.com. This way, nothing will be sitting on the server taking up space and you won’t have to worry about cleaning up old emails.

Thursday, January 23, 2014

Disabling an email account

How can a particular email account be ‘disabled’ temporarily. Note that the email account should not be ‘deleted’ ? Is this possible at all via cPanel?

There is no direct functionality in cPanel at the moment for this. This feature might be added at a later stage.
However, you can achieve this functionality by modifying a few entries via SSH.

Comment out the entries related to the particular email account in the following locations:
/home/user/etc/domainname/passwd
/home/user/etc/domainname/shadow
/home/user/etc/domainname/quota

Make sure that you just comment them and NOT delete them as you might need them back later.

Where to check the version of Horde

Where can I check the current version of Horde webmail client running with cPanel ?

If you have ‘root’ SSH access to the server then, simply open the file /var/cpanel/horde/version using your favorite editor and you’ll be able to see the current Horde version.


How to limit the overall size of emails

How can the overall size of an email including attachment, encoding etc. be limited to a pre-defined value?


This can be done in the following way :
Go to WHM >> Main >> Service Configuration >> Exim Configuration Editor
In the first box where you can type ( right below where you see ‘#!!# cPanel Exim 4 Config’ ), add the following directive :
message_size_limit = 100M
This will limit the overall size of the message to 100Mb

How to block emails from a specific address using Exim

How to block emails from a specific address on a cPanel/WHM server using Exim ?

This is fairly easy to achieve with Exim.
First you’ll need to find the system filter file for Exim. This can be found out through WHM >> Main >> Service Configuration >> Exim Configuration Editor.
Towards the middle of the page, under the section ‘Filters’ , you ‘ll find the path to the file.
Open that file via SSH using your favorite editor and add the following to it :

    if first_delivery
    and ( (“$h_from:” contains “emailtoblock@domainname.com”)
    )
    then fail
    endif

How to change the default email settings

Issue :
Whenever a new account is created, the server sends out an email notification. Where can this setting be accessed and modified?

Fix :
Just go to WHM >> Basic cPanel/WHM Setup >> Server Contact Email Address.
You can make the required changes there.

SpamAssassin : WHM ACL Options : Reject mails with spam score at SMTP time

Issue :

It seems that by default, it is set to reject mails with a spam score of more than 20 at SMTP time. How to change the value of spam score for rejecting the mails at SMTP time ?

Solution :

You can do that by doing the following :

1. Go to WHM >> Main >> Service Configuration >> Exim Configuration Editor
2. Look for the section ‘ACL Options’ .
3. The first parameter under that deals with the spam score setting at SMTP time. De-select the check box corresponding to that.
4. When you de-select the check box, it will give you the other available options. Check the box corresponding to the desired value.
5. Click on ‘Save’ at the bottom to save the settings.

Tuesday, July 16, 2013

How to enable DKIM in cPanel server.

DomainKeys Identified Mail (DKIM) lets an organization take responsibility for a message while it is in transit and one can use this to prevent from getting blacklisted by the free email providers like Yahoo, MSN and Google. DKIM can increase the mail authenticity.

cPanel does not have an interface to enable DKIM like we have for SPF and Domain Keys. cPanel is still working on it for getting it implemented. However we can enable it manually by following the below steps.

Check if exim is compiled with DKIM support enabled.
root@server # /usr/sbin/exim -dd 2>&1 | grep Experimental_DKIM

Support for: crypteq iconv() IPv6 PAM Perl OpenSSL Content_Scanning Old_Demime Experimental_SPF Experimental_SRS
Experimental_DomainKeys Experimental_DKIM

Generate the SSL keys
    cd /usr/local/cpanel/etc/exim
     openssl genrsa -out dkim.key 1024
     openssl rsa -in dkim.key -out dkim.public -pubout -outform PEM

You will find two keys, dkim.key & dkim.public

Friday, April 12, 2013

phplist is sending 2 mails

This is very simple to fix.

Open the mailing_list_name/config/config.php

in the config file, find define(‘SEND_ONE_TESTMAIL’,0);
change the value from 0 to 1

You did i

HOW-TO: finding “Nobody” spammer

In this script we will change the sendmail binary with a custom script, because php is using the sendmail to send the mails through script. So the spammer is calling this script instead, which is then logging the user info into a log file before calling the now renamed sendmail.

After installation check /var/log/formmail.log to find spammer activity.
Installation:

Note:- Place take a backup before moving the file to prevent any sort of data loss issue.
mv /usr/sbin/sendmail /usr/sbin/sendmail.act

vim /usr/sbin/sendmail (paste the below code into it)
chmod +x /usr/sbin/sendmail
echo > /var/log/formmail.log
chmod 777 /var/log/formmail.log

Using “imapcopy” to transfer the mails

MAPcopy is a small utility that will help you migrate from one IMAP e-mail message store to a another one.

1) wget http://home.arcor.de/armin.diehl/imapcopy/imapcopy.tar.gz

2) tar -xzvf imapcopy.tar.gz

3) cd imapcopy

4) Edit the file “ImapCopy.cfg”

Adjust the source and destination server. Add the source and destination users and passwords. The following sample copys the users “foo” and “bar” from server source.imap.com port 143 to server dest.imap.com port 145. Passwords for foo are “foosrcpw” and “foodestpw”, for bar “barsrcpw” and “bardstpw”. The folders “Trash”, “Sent” and “Sent Objects” will not be copied.

SourceServer source.imap.com
SourcePort 143
DestServer dest.imap.com
DestPort 145

#CreateEmptyFolders

skipfolder INBOX.Trash
skipfolder INBOX.Sent
skipfolder "INBOX.Sent Objects"

#       SourceUser SourcePassword   DestinationUser DestinationPassword
Copy    "foo"       "foosrcpw"         "foo"          "foodestpw"
Copy    "bar"       "barsrcpw"         "bar"          "bardestpw"

Now verify that all users and passwords are correct:

imapcopy -t

You can also show some information about the used servers:

imapcopy -i

You can copy the mails as:

imapcopy

Mail transfer with IMAPSYNC

It is a tool to sync, migrate copy mails from source IMAP server to the destination servers.

1) Installation (this need Perl module Mail::IMAPClient supports)

yum install imapsync

2) for more details please use the command ‘imapsync –help’

3) You can transfer mails as follows : (you can use for loop with this)

imapsync --host1 imap.src.fr  --user1 buddy --password1 secret1 --host2 imap.dest.fr --user2 max   --password2 secret2

or

imapsync --host1 server1.example.com --user1 sales@example.com --passfile1 /et

Spam filtering with Exim filter on cPanel

1) touch /var/log/filter.log
2) chmod 0644 /var/log/filter.log

3) cp /etc/cpanel_exim_system_filter /etc/cpanel_exim_system_filter_new
Then paste the following code into last of the file “/etc/cpanel_exim_system_filter_new” and save.
—————————————————————————————–
# START
# Filters all incoming an outgoing mail
logfile /var/log/filter.log 0644
## Common Spam
if
# Header Spam
 $header_subject: contains "Pharmaceutical"
 or $header_subject: contains "Viagra"
 or $header_subject: contains "Cialis"
 or $header_subject: contains "RE: DISCOUNT 80% 0FF on Pfizer !"
 or $header_subject: is "The Ultimate Online Pharmaceutical"
 or $header_subject: contains "***SPAM***"
 or $header_subject: contains "[SPAM]"

Wednesday, March 27, 2013

Postfix Flush the Mail Queue

Traditionally you use the “sendmail -q” command to flush mail queue under Sendmail MTA. Under Postfix MTA, just enter the following command to flush the mail queue:[...]


How To: Exim Remove All messages From the Mail Queue

If you have ever had the need to delete specific email messages out of the queue here are a few commands that will help you out.  Personally on my WHM\cPanel servers I prefer to load ConfigServer’s Mail Queues plugin for cPanel. If your interested in installing CMQ here is a link to their page http://www.configserver.com/cp/cmq.html [...]