顯示具有 Mail 標籤的文章。 顯示所有文章
顯示具有 Mail 標籤的文章。 顯示所有文章

2023年8月30日 星期三

RockyLinux 9.2 sensmail allow relay

#安裝sendmail
yum install sendmail

#修改設定
cd /etc/mail
vi sendmail.cf
將這一行mark起來(allow remote connect)
#O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA

vi relay-domains
新增要寄信的IP,Ex: 192.168.10.29

#啟動sendmail
systemctl start sendmail
systemctl enable sendmail

#開啟防火牆
firewall-cmd --permanent --add-port=25/tcp
firewall-cmd --reload

2022年5月16日 星期一

2021年3月29日 星期一

2019年5月27日 星期一

客戶收到信變成 winmail.dat

狀況:
寄有貼圖的 email 給同一家客戶的兩個人,其中一人收信正常,另一人收信變成winmail.dat。
檢查我們 outlook 的寄信格式確定是用 HTML。


2019年4月10日 星期三

Spam IP Check 網站

Reference:
Spam IP Check 網站備忘錄

查詢IP是否被某些組織列為黑名單可至下列網址

http://www.dnsbl.info/

http://www.mxtoolbox.com/blacklists.aspx


2017年8月11日 星期五

CentOS 6 mail

Reference:
How To Send E-Mail Alerts on a CentOS VPS for System Monitoring
如何刪除 Postfix 中所有還沒發送的郵件
於 Bash shell echo 輸入換行字元的寫法

設定寄信 mail server

  • vi /etc/mail.rc
  • set smtp=smtp://smtp.example.com:25
刪除 mail Queue 中的郵件
  • mailq  (查詢 mail queue)
  • postsuper -d ALL (刪除 mail queue 所有郵件)
  • postsuper -d queue_id (刪除 mail queue 特定一封郵件)
echo 輸入換行字元
  • echo -e "\n"



2017年6月13日 星期二

2017年3月25日 星期六

Perl Net::SMTP::TLS attach file

Reference;
http://www.perlmonks.org/?node_id=784574

用 $smtp->datasend 傳附檔內容時,因為 gmail 接收資料有長度限制,如果一次傳送大量資料會出錯。變通辦法是用 split 將資料分段送出。


use Net::SMTP::TLS;
use MIME::Lite;

$gmail_from = 'account@gmail.com';
@gmail_bcc_png = ('bcc@gmail.com');
$mail_subject = "<mail_subjuct>";

$msg = MIME::Lite->new(
From       => $gmail_from,
    To         => $gmail_from,
    Subject    => $mail_subject,
Type     =>'multipart/mixed',
);
$msg->attach(
Type => 'image/png',
Path => '<file full path>',
Filename => 'report1.png',
Disposition => 'attachment'
);

$smtp = new Net::SMTP::TLS(
'smtp.gmail.com',
Port    => 587,
User    => '<account@gmail.com>',
Password=> '<password>',
Timeout => 30
);

$smtp->mail($gmail_from);

$smtp->bcc(@gmail_bcc_png);

$smtp->data();
  @tmp = split(/\n/, $msg->as_string);
foreach $line (@tmp) {
$line = $line . "\n";
$smtp->datasend( $line );
}
$smtp->dataend();

$smtp->quit;

2017年3月1日 星期三

Exchange 2010 move mailbox

How to Move Mailboxes in Exchange Server 2010


Exchange 2010 SP2 搬移 mailbox 後無法刪除原信箱,retry 次數過多造成很久才結束。
修改 C:\Program Files\Microsoft\Exchange Server\V14\Bin\MSExchangeMailboxReplication.exe.config
將 MaxCleanupRetries = "5" 改為 "1"

Reference:
MAPIEXCEPTIONUNEXPECTEDMAILBOXSTATE: UNABLE TO DELETE MAILBOX


升級到 SP3 可以解此問題。尚未升級前可以用指令刪除沒用到的信箱。
1.) Run the command to find the specific mailboxes that were impacted by this bug.

Get-MailboxStatistics -Database <MAILBOXDATABASE> | Where { $_.DisconnectReason -eq “SoftDeleted” } | fl LegacyDN, DisplayName, MailboxGUID,DisconnectReason

 2.) Run this command to remove those disconnected mailboxes cleanly.

Remove-StoreMailbox –Database <MAILBOXDATABASE> –Identity <MAILBOXGUID> –MailboxState Softdeleted

Reference:
Error with moving mailbox in Exchange 2010 SP2 RU3+

Exchange 2010 mail database create and mount fail

Reference:
Failed to create and mount database exchange 2010

Error message:
Couldn't mount the database that you specified. Specified database: <MailDB>; Error code: An Active Manager operation failed. Error The database action failed. Error: Operation failed with message: MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
. [Database: <MailDB>, Server: <MAIL server>].

SOLUTION:
Microsoft notes that the issue is related to having conflicting Domain Controller and Global Catalogue Server entries.  So do the following:
1.  Open EMC and right-click on “Organization Configuration”.  Choose “Modify Configuration Domain Controller”.
2.  Specify the domain and the DC.
3.  Open EMC and right-click on “Recipient Configuration”.  Choose “Modify Recipient Scope”.
4.  Specify the global catalog server.  Make sure it is the same as the chosen DC.

上面步驟做完後,再試一次錯誤變成
Couldn't mount the database that you specified. Specified database: <MailDB>; Error code: An Active Manager operation failed. Error Couldn't find the specified mailbox database with GUID 'b8974f86-80d6-4cfc-ae68-6b5fa110xxxx'.. [Database: <MailDB>, Server: <MAIL server>].

再次 mount MailDB 卻成功了!

2017年1月6日 星期五

Outlook 2007 增加信箱大小

Reference:
Increase maximum size pst-files

Outlook 2003/2007 預設信箱檔案 (.ost, .pst)大小是 20GB,Outlook 2010 以上 50GB。
如果要調大必須修改 registry 才能夠超過限制。

For Outlook 2007:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\PST]
"WarnLargeFileSize"=dword:f3cf3cf2
"MaxLargeFileSize"=dword:ffffffff

2015年12月22日 星期二

Exchange 2010 resource for meeting room booking

用這個步驟新增會議室
Exchange Server 2010 Room Mailboxes Step by Step Guide

Add Management to owner

Add Meeting Room 1 to Outlook Calendar and set permission

2015年12月17日 星期四

Exchange 2010 allow internal anonymous relay

Reference:
How to Configure a Relay Connector for Exchange Server 2010
How to anonymously Relay in Exchange Server 2007/ 2010

Exchange Management Console / Server configuration / Hub Transport
=> New Receive Connector (Ex: myRelay)
Local Network Setting: 用預設值
Remote Network Setting: 將預設值刪除,新增內部特定 IP address
Permission Group: Anonymous Users
Authentication: 全部取消

開啟 Exchange Management Shell
Get-ReceiveConnector “myRelay” | Add-ADPermission -User “NT AUTHORITY\ANONYMOUS LOGON” -ExtendedRights “Ms-Exch-SMTP-Accept-Any-Recipient”

2015年8月26日 星期三

Mail sweeper Anti-Spam trust list



收信記錄文字檔路徑
C:\Program Files (x86)\Clearswift\MIMEsweeper for SMTP\Data\Logs\Operational

2015年8月21日 星期五

outlook 預約發信

Reference:
OUTLOOK 如何設定在凌晨自動發信

0. 開一封新郵件
1. Option
2. Delay Delivery
3. 設定預定寄信時間
4. Close
5. Send

注意!寄信後 Outlook 不能關掉。