Jump to content

Eltek.in Structure: Difference between revisions

From TetraWiki
Shashank (talk | contribs)
No edit summary
Raunaq (talk | contribs)
 
Line 2: Line 2:
== Introduction ==
== Introduction ==


Fetchmail structure, with main server being jbindia.co.in, and local server at their office. Local server can only be accessed via teamviewer.
[[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.
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.
Line 9: Line 9:


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


== Fetchmail Workaround ==
== Fetchmail Workaround ==

Latest revision as of 12:34, 9 August 2012

Introduction[edit]

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[edit]

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.