Jump to content

Eltek.in Structure

From TetraWiki
Revision as of 10:16, 9 August 2012 by Shashank (talk | contribs)

Introduction

Fetchmail structure, with main server being jbindia.co.in, and local server at their office. Local server can only be accessed via teamviewer.

Certain mail accounts are accessible from outside the office, and these are created on the jbindia.co.in server. Others are locally created, and these are fetched by the 'aliaseltek@eltek.in' ID.

Mails are sent via the jbindia server from the local server via the 'relayeltek@eltek.in' ID.

elteksgs.com is mapped as alias for eltek.in on jbindia server


Fetchmail Workaround

Fetchmail was not properly delivering mails addressed to 'eltekvalere.in'. This was due to addition of 'eltekvarlere.in-' and 'eltek.in-' in the 'Delivered To:' line of the headers.

'qvirtual' was used, but this can strip only one domain at a time. So it currently strips 'eltek.in-'.

To get around this problem, the following lines were added in crontab, to strip the mails from the 'new' folder.

* * * * * /usr/bin/perl -pi -e 's/eltekvalere.in-//g' /home/lxadmin/mail/domains/eltek.in/aliaseltek/Maildir/new/*
* * * * * sleep 30 ; /usr/bin/perl -pi -e 's/eltekvalere.in-//g' /home/lxadmin/mail/domains/eltek.in/aliaseltek/Maildir/new/*

NOTE: Mails that aren't delivered are sent to the log user on the local server. In case of missing mails, they can be retrieved from that user.