I suddenly noticed that courier-mta was throwing a lot of errors. In fact, it seems that it can receive emails but cannot send them. The error message is
Address family not supported by protocol
Well, I thought it might be something to do with IPv6, but it turned out that /etc/resolv.conf was simply not written properly. Specifically,
nameserver 127.0.0.1
I should have specified it like this, but I don't know why, but I wrote "localhost" orz